Therefore that the two media items can have the same filename or umbracoFile property it isn't possible to be sure that you have the correct media. If you have the folder in which the media file is located (eg /media/1234/myfile.jpg) then you have the id of the property. where you can iterate through all medias to search for this id. Otherwise you can iterate through all medias and try to identify the media by the umbracoFile property. But as I said you can't be sure to get the correct media.
get media from file name - is it possible
hi
is it possible to identify a media item from it's filename ie umbracoFile property??
If you already know the filename why do you need the media item? Maybe if you explain more about what you're trying to do.
You could probably do it with a custom xslt extension, but I am not aware of an existing function.
-Chris
Therefore that the two media items can have the same filename or umbracoFile property it isn't possible to be sure that you have the correct media. If you have the folder in which the media file is located (eg /media/1234/myfile.jpg) then you have the id of the property. where you can iterate through all medias to search for this id. Otherwise you can iterate through all medias and try to identify the media by the umbracoFile property. But as I said you can't be sure to get the correct media.
hth, Thomas
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.