Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • John Bergman 483 posts 1132 karma points
    Jun 05, 2017 @ 07:15
    John Bergman
    0

    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?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jun 05, 2017 @ 12:46
    Dennis Aaen
    1

    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.

    <!-- 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.

    enter image description here

    Hope this helps,

    /Dennis

  • 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

Please Sign in or register to post replies