Jump to:

23002 Posts in 11855 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Max upload file size

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 475 Views
  • Adman
    Avatar
    Community Member
    5 Posts

    Max upload file size Link to this post

    Hi guys,

    I'm running Silverstripe 3.0.5 with no problems so far. I have just added a upload field and it says the file exceeds 2M. I researched solutions and found that you need to edit the php.ini file to ensure post_max_size and upload_max_filesize are set to = whatever you need.

    These are already set in the php.ini file that's in the root folder, and their values are 50M.

    Does anyone have any suggestions?

    Thanks!

  • Adman
    Avatar
    Community Member
    5 Posts

    Re: Max upload file size Link to this post

    I put a php.ini file in the framework directory and it made the upload file work, but broke other things.

    The support community sucks for Silverstripe. I never get a reply on here.

  • kinglozzer
    Avatar
    Community Member
    138 Posts

    Re: Max upload file size Link to this post

    Firstly do a phpinfo(); and check that your php.ini values are being applied. Also, when you create your uploadfield, try the following:

    $uploadField->getValidator()->setAllowedMaxFileSize(52428800); // 50Mb in bytes

    475 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.