3093 Posts in 875 Topics by 654 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1122 Views |
-
A short question: file extensions

22 June 2010 at 9:27pm Last edited: 22 June 2010 9:28pm
hello there, I have a short question:
How is it possible to add file-formats to upload in assets-folder? For example 'dot', 'dotx', 'xlst' and so on. -
Re: A short question: file extensions

22 June 2010 at 11:29pm
Suprised its not included by default. See File.php -> $allowed_extensions for the array of extensions. You could define your own array in your _config file..
File::$allowed_extensions[] = 'dot';
File::$allowed_extensions[] = 'dotx';Or define the whole array (copy the existing ones from File.php to start with).
-
Re: A short question: file extensions

23 June 2010 at 4:39am
Thx Will,
but this is what i've done in my first try.
I added to /mysite/_config.phpFile::$allowed_extensions[] = 'dot';
File::$allowed_extensions[] = 'dotx';
File::$allowed_extensions[] = 'xlst';
File::$allowed_extensions[] = 'xlstx';and called a "dev/build/?flush=1"
after this no more file-upload was possible; the frame in admin->files etc. shows a page-error after using the "upload files"-button.
Firefoxs developer-tools gave me no hint. Silverstripe is 2.4, no modules or widgets, only a custom template on in this time, system is debian lenny (and it's my 28th SilverStripe installation bthw ;) ).At this moment I test it on a other (similar "lenny") system and it works well. Smells like I'm getting old or I have to make a new installation
.
After rollback the _config.php everything works well (hm - yes without the file-extensions above...).
| 1122 Views | ||
|
Page:
1
|
Go to Top |


