Copied to clipboard

Flag this post as spam?

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


  • Mark Thomas 34 posts 127 karma points
    Sep 30, 2013 @ 16:02
    Mark Thomas
    0

    How do I restrict the size of files Contour uploads?

    I have a form that I want to restrict file size on. How can I accomplish this?

    The only example I can find is to create custom file types for Umbraco and not Contour?

    I am maintaining an old installation of Contour 1.1.13.2 on Umbraco 4.8.0

     

    Mark.

  • Comment author was deleted

    Sep 30, 2013 @ 16:19

    You can find Contour docs here http://our.umbraco.org/projects/umbraco-pro/contour/documentation

    So you'll need to extend the default upload field type to make that possible

  • Comment author was deleted

    Sep 30, 2013 @ 16:19

    There is a filtered upload one that might give you a head start http://our.umbraco.org/projects/backoffice-extensions/cogworks-cogfilteredupload

  • Mark Thomas 34 posts 127 karma points
    Oct 01, 2013 @ 08:53
    Mark Thomas
    0

    Thanks Tim.

    I had found these examples, but just amazed that no-one has shared this code before for such a basic restriction to the file upload control. It must have been done before. And it's not in the Contour Contrib either.

    I'll get on it right away and see where I can put it for others benefit.

    Mark.

  • Comment author was deleted

    Oct 01, 2013 @ 10:43

    Yeah if you could share it that would be ace :) good luck!

  • Robert Godino 40 posts 129 karma points
    Jun 03, 2014 @ 09:41
    Robert Godino
    0

    Hi Mark, wondering if you can help me.

    I too have a form with an upload field that I want to restrict the uploaded file to 5MB. However, looking at your two links above, I still can’t work out how to achieve the task. Do you know the Regex I can use for this? 

    I have downloadied Cog Filtered Upload but it is still not clear how to make this work. Any feedback woud be greatly appreciated.

    Thanks, Robert

  • Mark Thomas 34 posts 127 karma points
    Jun 03, 2014 @ 10:16
    Mark Thomas
    0

    Hi Robert,

    Unfortunately I never got this working and used our mail system/file system to restrict uploads as it only for a short term site.

    Mark.

  • Robert Godino 40 posts 129 karma points
    Jun 03, 2014 @ 11:51
    Robert Godino
    0

    Thanks Mark,

    Looks like setting up the 5MB file upload restriction server-side might be the only option. A little disappointed that something so abvious is mising from Contour.

    Thanks for fast reply.

Please Sign in or register to post replies

Write your reply to:

Draft