Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi
When GetMedia returns the path for my media, it adds numbers and the extension, but without a dot before the extension, therefore messing up the path.It should look like this/media/1224/myimage[1].jpg
But instead it looks like this/media/1224/myimage[1].jpg47560755286jpg
Im new to umbraco, so im kinda lost on what todo?Thanks in advance!
Have a look at the solution of this topic. You've got the same problem: http://our.umbraco.org/forum/core/41-feedback/10539-mediaCurrent-and-Macro-container
Jeroen
You need to use
umbraco.library:GetMedia($mediaId, false())/umbracoFile
Hope this helps,Dan
Ahh, thank you very much :)
When i do that, it outputs nothing.
umbraco.library:GetMedia($mediaId, false())/@umbracoFile
What am i doing wrong?
Thanks for your quick response :)
I figured it out :)umbraco.library:GetMedia($mediaId, false())/data [@alias = 'umbracoFile']
Seems your still using Umbraco 4.0.x. The examples were for Umbraco 4.5.x. The example you used 2 posts ago was also wrong.
This should be
You don't need the @ because it's not an attirbute, but an element.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
GetMedia returns path but it messes up extension
Hi
When GetMedia returns the path for my media, it adds numbers and the extension, but without a dot before the extension, therefore messing up the path.
It should look like this
/media/1224/myimage[1].jpg
But instead it looks like this
/media/1224/myimage[1].jpg47560755286jpg
Im new to umbraco, so im kinda lost on what todo?
Thanks in advance!
Have a look at the solution of this topic. You've got the same problem: http://our.umbraco.org/forum/core/41-feedback/10539-mediaCurrent-and-Macro-container
Jeroen
You need to use
Hope this helps,
Dan
Ahh, thank you very much :)
When i do that, it outputs nothing.
umbraco.library:GetMedia($mediaId, false())/@umbracoFile
What am i doing wrong?
Thanks for your quick response :)
I figured it out :)
umbraco.library:GetMedia($mediaId, false())/data [@alias = 'umbracoFile']
Seems your still using Umbraco 4.0.x. The examples were for Umbraco 4.5.x. The example you used 2 posts ago was also wrong.
umbraco.library:GetMedia($mediaId, false())/@umbracoFile
This should be
umbraco.library:GetMedia($mediaId, false())/umbracoFile
You don't need the @ because it's not an attirbute, but an element.
Jeroen
is working on a reply...