Best way to check if an image is an assest/IContent

Vote:
 

Is there an API function to check if an file in a container has a corresponding IContent object? 

I would like to check if, for example, the file 'd5f5d04f0a2a4279abea2d1e2edcef6b/6598d114649f403494a5e39ae0e52e12.png' is an asset/media in use in Episerver.

#184854
Edited, Nov 06, 2017 12:26
Vote:
 

Should be something like:

var content = UrlResolver.Current.Route(new UrlBuilder("your-path"))

http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=117930

#185409
Nov 17, 2017 17:45
Vote:
 

IIRC the the folder name (or file name without extension, I usually mix things up) is actually the content guid. You can try to load content based on that guid and see if it returns something

#185540
Nov 22, 2017 18:23
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.