Copied to clipboard

Flag this post as spam?

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


  • Asif Malik 203 posts 339 karma points
    Jan 20, 2010 @ 14:16
    Asif Malik
    0

    Question about custom media type

    Hi, apologies if I have posted this to the wrong forum, however i am very new to umbraco and wasnt sure where i should post this.

    Basically i have created a custom media type, that takes a file upload and a title, have called this new media type downloadable file. I would like to display the file size and am not sure how i could do this. Ideally like the built in Media types (File) i would like to have a property called (fileSize) that is type Label, but am unsure how to go about populating this.

     

    Thanks in advance

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Jan 20, 2010 @ 14:25
    Thomas Höhler
    1

    If this new media type has the upload field as one property just add the following properties to your media type:

    • umbracoWidth
    • umbracoHeight
    • umbracoBytes
    • umbracoExtension

    The values should be filled in automatically by the uploadField datatype...

    hth, Thomas

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Jan 20, 2010 @ 14:26
    Thomas Höhler
    0

    Forgot to mention that all properties should be from type Label. Just as they are in the original Image or File Media Type

    Thomas

  • Asif Malik 203 posts 339 karma points
    Jan 20, 2010 @ 14:38
    Asif Malik
    0

    Excellent that worked perfectly, thnak you very much

Please Sign in or register to post replies

Write your reply to:

Draft