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.
So in the CMS if I have a photo uploaded, I can "replace with one from my computer"
Can this be done with Files? For example, if I update a file (say a form). Shouldnt there be an option to replace the file? I cant seem to make this happen.
Any thoughts? Am I missing something? I do have Uncle Cheese's DOM installed. Maybe something there?
I can see that the File class has updateLinks()
http://api.silverstripe.org/default/File.html#updateLinks - but can't find any way to update the actual filesystem file via the Files & Images admin and then fire off this updateLinks() for the selected File entry in the db.
Once an admin has a bunch of links everywhere directed to a particular File, if they need to update the pdf (for example) they have to upload a new File via the admin and then go to all the pages referring to the old File and change the links.. ? That can't be right can it?
What have I missed?
Outstanding! Thanks ajshort, I'll be giving this a go very shortly. Do you know if it's 2.4rc1 compatible?
I'm getting a few errors, firstly after /dev/build/ I tried to run /dev/tests/ but got
[Warning] copy(/path/to/website/root/www/assets/Uploads/_versions/12/Kids-2B1.ssets/uploads/kids-2b): failed to open stream: No such file or directory
And if I now try to open the Files & Images Admin I get
[User Error] FieldSet::addFieldToTab() Tried to add a tab to object 'FieldSet' - 'BottomRoot' didn't exist.
eek! I'm running close to if not the latest 2.4. Any suggestions?
Ah, the first error was the result of that file not actually having an extension in its filename in the db.
Still getting the error relating to the BottomRoot tab not existing though. Going hunting now, but any suggestions welcome.
Unfortunately for my current timelines this appears a little too buggy out of the box.
Removed the no-extension file and changed references to "BottomRoot" tab to "Root" tab but then got the following when viewing a File and trying to replace it:
Viewing the file, versions drop down screenshot is attached.
Replacing the file,
[User Notice] Upload::setAllowedExtensions() is deprecated. Please use Upload_Validator::setAllowedExtensions() instead
Happy to help with some testing along the way but I can't use it in production just yet.