Copied to clipboard

Flag this post as spam?

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


  • Paul de Quant 403 posts 1520 karma points
    Mar 20, 2015 @ 18:00
    Paul de Quant
    0

    Restrict certain file extensions on file upload

    Hello,

    Can anyone tell me if it's possible to restrict the type of files that can be uploaded via the Contour File uploader. I only want a small selection of files to be permitted such as .jpg, .gif, .docx etc.

    It seems as though there's no RegEx on the file upload like there is on other fields.

    I'm using Umbraco 7.2.2 and the latest version of Contour.

    Many Thanks

    Paul

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Mar 23, 2015 @ 10:20
    Ismail Mayat
    0

    Paul,

    I did this ages ago https://our.umbraco.org/projects/backoffice-extensions/cogworks-cogfilteredupload it may work with latest contour, else you can download the dll decompile source using dotpeet and create your own.

    Regards

    Ismail

  • Paul de Quant 403 posts 1520 karma points
    Mar 23, 2015 @ 10:39
    Paul de Quant
    0

    Thanks Ismail, I'll take a look and let you know how it goes.

    Cheers

    Paul

  • Paul de Quant 403 posts 1520 karma points
    Mar 25, 2015 @ 12:55
    Paul de Quant
    0

    Hi Ismail,

    The CogWorks dll doesn't seem to work with the latest version of Umbraco Forms. I did take a peek in .Net Reflector but what I couldn't work out is where the file name is checked against the regex. Does this have to be done in the frontend control?

    Thanks

    Paul

  • bob baty-barr 1180 posts 1294 karma points MVP
    Jun 15, 2015 @ 18:16
    bob baty-barr
    0

    Ismail, super interested in this for the new umbraco forms... any chance of you tweaking it up for us non-dev types?

  • Jay 415 posts 641 karma points
    Jun 30, 2015 @ 13:34
    Jay
    0

    Any luck on this? trying to do the same thing to restrict certain file upload to Contour.

    Appreciate any help

    Thanks

  • Dave Brislane 15 posts 46 karma points
    Sep 25, 2015 @ 17:21
    Dave Brislane
    0

    Hi Guys.

    We had a requirement for this recently in the latest version of Forms, so developed something similar to Ismail's from previous versions to achieve. If there is still interest and a requirement for it then let me know and we'll get it shared.

    Kind regards,

    Dave.

  • Kristoffer Eriksen 185 posts 465 karma points
    Jan 07, 2016 @ 08:50
    Kristoffer Eriksen
    0

    Hey Dave

    I'm very interested in a solution

    Best Regards Kristoffer

  • Matthew Kirschner 323 posts 611 karma points
    Mar 03, 2016 @ 21:22
    Matthew Kirschner
    0

    I am also interested as this has just come up.

    This should be built into forms. The File Upload field type should much more options than it does now (which is 0).

  • [email protected] 406 posts 2135 karma points MVP 7x c-trib
    Mar 03, 2016 @ 21:37
  • Matthew Kirschner 323 posts 611 karma points
    Mar 03, 2016 @ 21:50
    Matthew Kirschner
    0

    Looks great! I may give this a shot later.

Please Sign in or register to post replies

Write your reply to:

Draft