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.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Uploadify file size? 5mb file says its uploaded but it hasn't.


Reply

6 Posts   7311 Views

Avatar
TF-35Lightning

15 September 2010 at 3:49am Community Member, 137 Posts

Hi all,

Just wondering if anyone knows if there is a file size limit on UncleCheeses uploadify? I have tried uploading files about 5megabytes and the progress bars shows up and run through and close and it feels like it has uploaded like a normal file (all my small files are uploading perfectly) but then the big file is no where to be seen. It's a PDF file by the way.

Any help would be great

Avatar
UncleCheese

15 September 2010 at 4:13am 4085 Posts

What are your PHP settings for upload_max_filesize and max_post_size? I think the default setting is 2MB, so that would explain it.

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
Heike-san

21 September 2010 at 1:25am Community Member, 52 Posts

I take advantage that the file size has been raised here to ask my question.
Is there any way to limit the maximum file size that can be uploaded with uploadify without having to make changes to the PHP settings ?

Avatar
UncleCheese

25 September 2010 at 4:39am 4085 Posts

$yourUploader->setVar('sizeLimit', 2000000);

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
James Bolitho

17 February 2011 at 2:04am Community Member, 33 Posts

Hi Uncle Cheese,

I am having some difficulty getting the 'sizeLimit' variable to work. This is a newbie question so some pointers would be helpful please.

I would like to set this globally across the cms and really only want this to apply an upload limit to image file uploads. However looking at other posts I am not sure it is that easy. The reason for this approach is due to limitations on the shared hosting that the site is on and the site that I manage is being used by people that are not that web savvy so I would like to prevent them from uploading huge images that would cause problems.

Reading the documentation on uploadify module I see this but adding it to my code had no effect:
UploadifyField::set_var('buttonText', 'Click me!');

What I was hoping was that I would be able to add this:
UploadifyField::set_var('sizeLimit', 2000000);

Below is one example of the code that I am trying to get this to work on:

   $sponsorreport = new DataObjectManager(
      $this,
      'Sponsors',
      'Sponsor',
      array(
         'BusinessName' => 'Business Name',
         'Website' => 'Website',
         'Thumbnail' => 'Logo'
      ),
      'getCMSFields_forPopup'
      );
      $sponsorreport->setAddTitle('Sponsor');

       $fields->addFieldToTab("Root.Content.Sponsors",$sponsorreport);

I am sure that I am missing something really obvious!
Thanks,

Jim

Avatar
Zencode

28 March 2011 at 3:19pm Community Member, 1 Post

Thanks for the step in the right direction uncleCheese