Jump to:

10848 Posts in 2516 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » UserForms File Upload Problem

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1345 Views
  • Hello_electro
    Avatar
    Community Member
    80 Posts

    UserForms File Upload Problem Link to this post

    Hi Everyone:

    So i seem to be having a similar problem as other with file upload limits. I cant get the userforms to pass any file uploads larger than around 2mb.

    I tried updating the php.ini to allow larger files, but it hasnt seemed to work. Below is what I have in there:

    register_globals = off
    allow_url_fopen = off

    expose_php = Off
    max_input_time = 60
    variables_order = "EGPCS"
    extension_dir = ./
    upload_tmp_dir = /tmp
    precision = 12
    SMTP = relay-hosting.secureserver.net
    url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
    memory_limit = 50M
    post_max_size = 10M
    file_uploads = On
    upload_max_filesize = 10M

    [Zend]
    zend_extension=/usr/local/zo/ZendExtensionManager.so
    zend_extension=/usr/local/zo/4_3/ZendOptimizer.so

    i am hosted through godaddy and am seeing if the issue is with them, but am wondering if there is anything I may be missing on the SS side.

    Thanks for any insights!

  • Hello_electro
    Avatar
    Community Member
    80 Posts

    Re: UserForms File Upload Problem Link to this post

    So, my main concer for this was to be able to have the file that was uploaded passed to the person set to receive the form information via email. The form data would come through, but not the uploaded file. I foinf out that the USERDEFINEDFORM.php file has a limit to 1 meg. after the file breaks this rule the file is only added to FILES and IMAGES and not passed through email. For those wondering how to change this rule, make this change in userdefinedform.php (line 540)

    // Attach the file if its less than 1MB, provide a link if its over.
                      if($file->getAbsoluteSize() < 1024*1024*1){
                         $attachments[] = $file;
                      }

    if you bump up the 1024 size, the image will pass. That is as long as the file doesnt hit your email clients restrictions.

    I feel very sherlocky about finding this one!

    1345 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.