Copied to clipboard

Flag this post as spam?

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


  • Sherry Ann Hernandez 320 posts 344 karma points
    May 22, 2011 @ 10:53
    Sherry Ann Hernandez
    0

    use regex validation for media picker

    Hi,

    Is it possible to use a regex validation to validate the media name in the media picker?

  • Osman Coskun 170 posts 404 karma points
    May 13, 2018 @ 08:46
    Osman Coskun
    0

    Would be nice if we could restrict the file types with regex or any other method.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    May 13, 2018 @ 09:16
    Dennis Aaen
    0

    Hi Osman,

    If you want to restrict the file types that can be uploaded into the media library then you should look at the umbracoSetting.config in the /config folder.

    In this file you will find a section about disallowed file types.

    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>
    

    Hope this can be a solution for you.

    /Dennis

  • Osman Coskun 170 posts 404 karma points
    May 13, 2018 @ 09:33
    Osman Coskun
    1

    Hi Dennis,

    Thanks for the info. I already use DisallowedUploadFiles.

    What i want to make is to restrict the media picker by file extensions. For instance i have a media picker for video, to minimize the editor errors i want the media picker just accept the .mp4 files in library, or in upload step.

    May be in future versions ;)

    Best regards...

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

Please Sign in or register to post replies