Copied to clipboard

Flag this post as spam?

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


  • martinrousev 59 posts 23 karma points
    Feb 16, 2009 @ 16:21
    martinrousev
    0

    Getting a file from MediaPicker

    Hi all,

    I'm trying to get a link to a file I have uploaded in a property of type media picker on the current page.

    Now I am aware of the following:
    [code][/code]

    but this doesn't seem to work for files other than images. I get the following error:
    [code]System.Xml.XPath.XPathException: Function 'umbraco.library:GetMedia()' has failed. ---> System.OverflowException: Value was either too large or too small for an Int32. [/code]

    I have verified that the alias of the field is correct. Am I misusing it somehow?

    Thanks,
    Martin

  • Comment author was deleted

    Feb 16, 2009 @ 16:37

    add an

  • martinrousev 59 posts 23 karma points
    Feb 16, 2009 @ 16:43
    martinrousev
    0

    Thanks Tim,

    Unfortunately this didn't solve my problem. How would Umbraco know if there are empty fields while saving?
    Actually it is my mistake for not mentioning that this error happens when I try to save the file.

    Martin

    EDIT:

    I had a small spelling error and that is why Tim's suggestion didn't work. Now I can successfully save the xslt but the links ofcourse do not show and I can't figure out why.

  • Comment author was deleted

    Feb 16, 2009 @ 16:56

    And if you check "Skip testing (ignore errors)".

  • bob baty-barr 1180 posts 1294 karma points MVP
    Feb 16, 2009 @ 23:04
    bob baty-barr
    0

    is the field a media picker or an upload type on the node??? i cannot think why it would work for images and not files...

    you can try swapping your 'false' for a '0' zero... i have used that syntax before... also, let us know if you solve this as i am very curious.

  • martinrousev 59 posts 23 karma points
    Feb 17, 2009 @ 12:10
    martinrousev
    0

    Hi,

    I changed 'false' to false() and republished the whole content tree. I'm not sure how but this seems to help.

    Thanks to everyone who wrote in.
    Martin


    EDIT:
    Oh, I forgot the most important thing I did. I changed the name of the field to be the same as the alias.

Please Sign in or register to post replies

Write your reply to:

Draft