Jump to:

5539 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Disable Image/File 'Upload from your computer' option

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

Page: 1
Go to End
Author Topic: 2054 Views
  • svinkle
    Avatar
    Community Member
    16 Posts

    Disable Image/File 'Upload from your computer' option Link to this post

    I am using FileIFrameField and ImageField 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?

  • ttyl
    Avatar
    Community Member
    114 Posts

    Re: Disable Image/File 'Upload from your computer' option Link to this post

    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'?

  • swaiba
    Avatar
    Forum Moderator
    1788 Posts

    Re: Disable Image/File 'Upload from your computer' option Link to this post

    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

  • BenWu
    Avatar
    Community Member
    87 Posts

    Re: Disable Image/File 'Upload from your computer' option Link to this post

    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.

    2054 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.