Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

UserForms File Upload Problem


Go to End


2 Posts   2073 Views

Avatar
Hello_electro

Community Member, 80 Posts

19 January 2010 at 10:15am

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!

Avatar
Hello_electro

Community Member, 80 Posts

20 January 2010 at 3:20pm

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!