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?
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.
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
add an
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
And if you check "Skip testing (ignore errors)".
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.
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.
is working on a reply...