7912 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » 2.4.0 can't upload .f4v files to assets folder
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1481 Views |
-
2.4.0 can't upload .f4v files to assets folder

13 May 2010 at 3:47am
Hi, i upgraded a website to 2.4.0.
Now I can't upload .f4v Videos to the assets folder anymore (with DOM installed).
If I upload the file with a different extension and then try to change the file name I get the an error that the Extension is not allowed an a list of valid extensions. How can you change, extend that list?[User Error] Uncaught ValidationException: Validation error writing a File object: Extension is not allowed (valid: , ace, arc, arj, asf, au, avi, bmp, bz2, cab, cda, css, csv, dmg, doc, docx, flv, gif, gz, hqx, htm, html, ico, jar, jpeg, jpg, js, m4a, m4v, mid, midi, mkv, mov, mp3, mp4, mpa, mpeg, mpg, ogg, pages, pcx, pdf, pkg, png, pps, ppt, pptx, ra, ram, rm, rtf, sit, sitx, swf, tar, tgz, tif, tiff, txt, wav, wma, wmv, xhtml, xls, xlsx, xml, zip, zipx). Object not written.
POST /admin/assets/EditForm/field/Files/item/153/DetailFormLine 931 in /var/syscp/webs/hempen/httpdocs/sapphire/core/model/DataObject.php
Source922 $firstWrite = false;
923 $this->brokenOnWrite = true;
924 $isNewRecord = false;
925
926 if(self::get_validation_enabled()) {
927 $valid = $this->validate();
928 if(!$valid->valid()) {
929 // Used by DODs to clean up after themselves, eg, Versioned
930 $this->extend('onAfterSkippedWrite');
931 throw new ValidationException($valid, "Validation error writing a $this->class object: " . $valid->message() . ". Object not written.", E_USER_WARNING);
932 return false;
933 }
934 }
935
936 $this->onBeforeWrite();
937 if($this->brokenOnWrite) {Trace
* DataObject->write()
Line 867 of DataObjectManager.php
* DataObjectManager_ItemRequest->saveComplexTableField(Array,FileDataObjectManager_Popup,SS_HTTPRequest)
Line 296 of Form.php
* Form->httpSubmission(SS_HTTPRequest)
Line 134 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 152 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 152 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 152 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 152 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
* Controller->handleRequest(SS_HTTPRequest)
Line 283 of Director.php
* Director::handleRequest(SS_HTTPRequest,Session)
Line 127 of Director.php
* Director::direct(/admin/assets/EditForm/field/Files/item/153/DetailForm)
Line 127 of main.phpThanks
Johannes -
Re: 2.4.0 can't upload .f4v files to assets folder

13 May 2010 at 5:01am
This actually isn't a DOM issue. It looks like SS is validating file extensions in 2.4.. see File::$allowed_extensions
It's a public variable, so you can probably just modify it with File::$allowed_extensions[] = "xxx";
-
Re: 2.4.0 can't upload .f4v files to assets folder

13 May 2010 at 9:08am
I'm glad I came across this... I am having the same problem uploading a file with userforms and I'd like to change the allowable extensions. Is there a way to add a wild card so that any file type could be uploaded?
-
Re: 2.4.0 can't upload .f4v files to assets folder

31 May 2010 at 10:54am Last edited: 31 May 2010 10:57am
Has anyone found a solution to this problem? My assets folders includes files in lots of different formats, e.g., .cpp, .lha, and I can't even save the folder name right now. I need to either be able to add valid file extensions, or disable extension checking for just the assets folder.
Hans
-
Re: 2.4.0 can't upload .f4v files to assets folder

31 May 2010 at 11:48am
I ended up using the SWFUpload module--it didn't restrict my file types. I was using an upload field via userforms module before.
-
Re: 2.4.0 can't upload .f4v files to assets folder

31 May 2010 at 5:05pm
Switching back to the SWFUpload module wasn't appealing, so I simply added the file types that I needed to sapphire/filesystems/File.php's allowed_extensions variable.
Hans
| 1481 Views | ||
|
Page:
1
|
Go to Top |


