How to Remove Upload as Files Checkbox



I have seen a common problem with Sitecore Media Library assets.  If users upload the files As Files using the checkbox shown below, you can run into problems in load balanced environments and environments with different websites for the Stage and Live databases.

Upload as Files

When you publish the media assets, their container or pointer is moved from the master to the web database in Sitecore, but the file assets in the file system are not moved by Sitecore.  You could setup a file replication application, but who wants to do that when there is an easier way. 

SOLUTION:

1. Configure the files to be uploaded as database blobs.

<!--  UPLOAD AS FILES
            Determines if media should be uploaded as files or as database blobs.
            Default: false
-->
<setting name="Media.UploadAsFiles" value="false" />

2. Edit the Web.config file to remove the checkbox option from the user.

<!--  UPLOAD USER SELECTABLE DESTINATION
            Defines if the user can select the destination database or file.
            Default: true
-->
<setting name="Upload.UserSelectableDestination" value="true" />


Categories:     

Add a comment
 
For Security please arrange
the letters to spell ‘OASIS’
  • O
  • A
  • S
  • I
  • S



 

Comments

  • Jen Rose
    8/2/2016 5:21 PM

    We believed the documentation in the config file that said this in Media-disable file media: If true, user interfaces do not present options to store media as files. All files will be stored in the database, disregarding the value of the Media.UploadAsFiles setting. <--- But only when we selected false in upload user selectable destination as pointed out in your (helpful) blog post above, did it work. Is that a sitecore bug?