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.

Customising the CMS

Disable Image/File 'Upload from your computer' option


Reply

4 Posts   2075 Views

Avatar
svinkle

10 February 2009 at 8:19am (Last edited: 10 February 2009 8:20am), Community Member, 16 Posts

I am using [url=http://doc.silverstripe.org/doku.php?id=fileiframefield]FileIFrameField[/url] and [url=http://doc.silverstripe.org/doku.php?id=imagefield]ImageField[/url] in various classes of my site. It seems to be a known issue that you can't select a different directory other than "Uploads" to upload your assets to. I noticed that you can create a new folder in the "Files and Images" part of the CMS. From there you can upload assets to wherever is needed and select the asset at the page level. My questions is: can you disable the radio button on these field types labelled, "With one from your computer"? My thinking is that this will force the editors to use the form on the "Files and Image" part of the CMS to upload new assets. They will still be able to use the "With one from the file store" option for selecting existing assets.

Or, has the issue of selecting a different directory to upload assets to been fixed?

Avatar
ttyl

13 May 2010 at 6:04am Community Member, 114 Posts

sadly nobody answered this question - but I have the same concern. I want to let people select from images an admin has been able to upload via the files tab and *not* to upload arbitrary images from their computer. is it possible to shut off 'from your computer'?

Avatar
swaiba

5 January 2011 at 2:42am Forum Moderator, 1796 Posts

Forgive me bringing this old topic up, but I just had a need to ADD the option from your computer.

This issue (ADD or REMOVING) is based on the users permissions of the 'File' object - in my case thought everyone can upload so I (gasp) hacked the code sapphire\filesystem\File.php with...

   function canCreate() {return true;}

... not the best, but I hope it help someone.

Barry

Avatar
BenWu

19 May 2012 at 12:07am Community Member, 90 Posts

I would like to do the opposite:

I would like to force a user to upload a file for different Product Object, and prevent user to link the new Product to a file already in filestore. I did this because I would like to remove the file when the Product is removed without affecting other products.

Maintaining the filestore is a concern for me when there are thousands of them in the store.

I therefore would like to know how to disable the 'From File Store' option.