This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

[closed] Problem with file upload.


  1. MvdL79
    Member

    Okay I seem to have a problem with the file upload function.

    The download link in the email is not correct for some reason.

    I get: http://www.domainname.com//download.php?q=Zm9ybV9pZD0xMCZpZD0yJmVsPWVsZW1lbnRfMzY=

    While it should be: http://www.domainname.com/bestelformulieren/download.php?q=Zm9ybV9pZD0xMCZpZD0yJmVsPWVsZW1lbnRfMzY=

    Where can I fix this?

    One more thing; is it possible to only allow the following file types to be sent:

    PDF
    JPG
    GIF
    PNG

    And disallow the rest?

    Posted 15 years ago #
  2. MvdL79
    Member

    I managed to fix the download link myself:
    Or at least I thought so...

    When I click the link the email it works fine, but when I login the control panel and click the view link it now says 404... :(

    Posted 15 years ago #
  3. MvdL79
    Member

    Okay I managed to get it working 100% (for email and online viewing).

    I changed: '://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/download.php?q='.$q_string.'

    into: '://'.$_SERVER['HTTP_HOST'].'/bestelformulieren/download.php?q='.$q_string.'

    That worked! :)
    ...I am starting to impress myself. ;)

    Anyways I still need your help about limiting file upload to several extensions (mentioned in my earlier post).

    Hopefully you can help me with that! :)

    Posted 15 years ago #
  4. MvdL79
    Member

    Okay after much considering, I want the file upload to be limited to:

    - .JPG
    - .GIF
    - .PNG
    - .PDF

    Any way to limite the upload to these file types?

    Posted 15 years ago #
  5. yuniar

    Check this post:
    http://www.appnitro.com/forums/topic/limit-attachment-types?replies=4#post-985


    MachForm Founder

    Posted 15 years ago #
  6. MvdL79
    Member

    Oops, sorry... I did search for it, but could not find it.
    Anyways I tried what you said in that post and it worked! Thanks!

    Posted 15 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.