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
    Jan 19, 2011 @ 08:39
    Sherry Ann Hernandez
    0

    extending the media folder by adding custom validation

    Hi Guys,

    I was thinking of extending the media folder as our client requirement. Before uploading the media, we wanted to check the file size and the file size dimension.

    I was thinking of adding it in the editMedia.aspx.cs before calling the _media.Save(); and then recompile the code.

    Do you have any other suggestion that won't require me to recompile. Tim suggested to use the event model but i'm a little clueless on how to do it.

    Thanks,

    Sherry

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Jan 19, 2011 @ 08:52
    Richard Soeteman
    0

    HI Sherry,

    Recompiling the sourcecode is a bad thing to do,you can easy extend Umbraco with your custom datatypes/events etc. Anyway events is probably not the most flexible solution to add validation. The only thing a user sees is "Save got canceled bvy a third party component" .

    What I would do is create a custom datatype and add the custom validation on that datatype.

    You might want toc checkout these blogposts how to do this

    http://www.nibble.be/?p=24

    http://www.nibble.be/?p=97

    Hope this helps you a bit.

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft