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

Upload function. Pre sale question


  1. normanm4
    Member

    Using the "upload" choice am I able to: 1. limit the file types 2. determine the file size limits 3. determine the directory to which the uploads go 4. offer multiple upload field?

    Thanks.

    Posted 15 years ago #
  2. yuniar

    1. Yes

    2. No, this can't be set from MachForm, you'll need to modify your php.ini file or use .htaccess file (depends on your hosting policy though, some company doesn't even allow you to modify anything).

    3. Yes

    4. Yes


    MachForm Founder

    Posted 15 years ago #
  3. getnbye
    Member

    I had these same questions so I performed a search and found this link. The question I have now is how do I perform these tasks?

    1. Limit to only certian file types (.jpg / .gif / .bmp / .tiff)?

    2. Limit each upload section. I have five total upload sections, how can I put a limit on each or does the limit cover the total size of all uploads?

    3. How do I change the directory that all uploads are kept in?

    Just one quick comment.. Great Job to the Appnitro team and Thank You for being so quick to answer the many questions sent to you! I've never dealt with a team so focused on helping the customer.

    I've passed nothing but praise to my friends in the business and I hope this generates many new orders for you as you've deserved it.

    It's great to deal with a company that still values the customer and their experience with the product.

    Thank you,

    Chris

    Posted 15 years ago #
  4. redityo

    Hi Chris,

    For you questions :

    1. To limit upload file type you need to edit "config.php" file, in there you will see this code :

    define('UPLOAD_FILETYPE_ALLOW',''); //allow only these filetypes to be uploaded

    change to

    define('UPLOAD_FILETYPE_ALLOW','jpg;gif;bmp;tiff'); //allow only these filetypes to be uploaded

    2. You can follow this post to set limit validation for your upload field

    http://www.appnitro.com/forums/topic/file-size-error-message?replies=3#post-4082

    3. Simply edit your "config.php" file and change for this setting ( by default uploaded file stored in "machform data" folder) :

    define('UPLOAD_DIR', './data');

    anyway thank's for your nice word :)


    MachForm Support

    Posted 15 years ago #
  5. getnbye
    Member

    Ok.. now I've went and done it and blown my stuff up. :)

    I followed the directions for setting a file size and file type limit and now upon submitting a form it blows up.

    http://www.65gs.com/form/view.php?id=2

    It started when I left a single upload box empty and it came back with a message that this file type is not acceptable although there was nothing in the field... so basically a blank field was unacceptalbe?

    Now even when I put things in the upload fields, it's still not working correctly.

    Here is my error message -

    Warning: call_user_func(validate_required) [function.call-user-func]: First argument is expected to be a valid callback in /home4/granspor/public_html/form/includes/common-validator.php on line 401

    Warning: Cannot modify header information - headers already sent by (output started at /home4/granspor/public_html/form/includes/common-validator.php:401) in /home4/granspor/public_html/form/view.php on line 51

    I have no idea what is going on and now when I bring up a new form, the data I put into the form before the crash is still there.

    I've been going back through and trying to reverse all the changes I've made. One thing I need to verify is what a standard includes/common-validator.php file looks like from lines 29 - 41

    Thank you,

    Chris

    Posted 15 years ago #
  6. Saghalie
    Pro Member

    Just re-upload the original file. If you don't have it; just download the original software from the download section of your login.

    Saghalie

    Posted 15 years ago #

RSS feed for this topic

Reply