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.

General Questions /

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

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

[Fixed] File Upload Fails


Go to End


2 Posts   703 Views

Avatar
Josh M

Community Member, 3 Posts

5 May 2015 at 9:06am

Edited: 28/05/2015 10:06am

Hi,

I'm trying to upload Excel spread sheets and Word documents to a sub-folder of /assets/.

As you can see by the screenshot I'm unable to upload them however I can upload other file types such as .jpg. This is despite the fact that they are listed as allowed extensions.

I have tried adding the following to mysite/_config.php:

File::$allowed_extensions[] = 'xls';
File::$allowed_extensions[] = 'xlsx';
File::$allowed_extensions[] = 'doc';
File::$allowed_extensions[] = 'docx';

and have tried adding the following to mysite/_config/config.yml as recommended here :

  File: 
      allowed_extensions: 
        - xls
        - xlsx
        - doc
        - docx

Any help would be appreciated.

Framework: 3.1.12
CMS: 3.1.12

Thanks.

___
Fix: Turned out to be an issue with XAMPP. Re-installed it and this worked fine. Not sure exactly what the issue was.

Attached Files
Avatar
Pyromanik

Community Member, 419 Posts

5 May 2015 at 9:24pm

Ensure you're flushing after altering the config, or the changes won't take effect.
Ensure that your webserver has permission to read such files (should do by default, but worth checking).