Limit File Types (if any) uploaded in the media section
Is there a way to limit the types of files uploaded to any specific folder? Also, is there a way to prevent users from uploading files to the "root" media folder?
There is a way to limit the types of files uploaded to the media section in Umbraco. Try to see the following documentation
DisallowedUploadFiles
This settings consists of a "black list" of file extensions that editors shouldn't be allowed to upload via the back-office.
<!-- These file types will not be allowed to be uploaded via the upload control for media and content -->
<disallowedUploadFiles>ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd,swf,xml,xhtml,html,htm,svg,php,htaccess</disallowedUploadFiles>
AllowedUploadFiles (introduced in 7.6.2)
If greater control is required than available from the above, this setting can be used to store a "white list" of file extensions. If provided, only files with these extensions can be uploaded via the back-office.
<!-- If completed, only the file extensions listed below will be allowed to be uploaded. If empty, disallowedUploadFiles will apply to prevent upload of specific file extensions. -->
For the question about if there is a way to prevent users from uploading files to the "root" media folder, then you can remove the allow tick for the file and image media types then you will need to create a folder before you can upload images.
Try to see this screenshot where you need to remove the allow in root both for file and image media type.
Limit File Types (if any) uploaded in the media section
Is there a way to limit the types of files uploaded to any specific folder? Also, is there a way to prevent users from uploading files to the "root" media folder?
Hi John,
There is a way to limit the types of files uploaded to the media section in Umbraco. Try to see the following documentation
DisallowedUploadFiles
This settings consists of a "black list" of file extensions that editors shouldn't be allowed to upload via the back-office.
AllowedUploadFiles (introduced in 7.6.2)
If greater control is required than available from the above, this setting can be used to store a "white list" of file extensions. If provided, only files with these extensions can be uploaded via the back-office.
For the question about if there is a way to prevent users from uploading files to the "root" media folder, then you can remove the allow tick for the file and image media types then you will need to create a folder before you can upload images.
Try to see this screenshot where you need to remove the allow in root both for file and image media type.
Hope this helps,
/Dennis
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion