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 guys
I am retrieving content using C# code which is working great via the IPublishedCache (UmbracoCOntext.Content and UmbracoContext.Media)
IPublishedCache
UmbracoCOntext.Content
UmbracoContext.Media
How could i determine what file type is being used as a general document has
umb://document//
in the URL, but a media file has
umb://media/
Ideally i just want to take an action once i have determined the type of file it is.
Was considering to check if the URL contains media or document in the URL but think there must be a better way.
Thanks
The returned value from umbracoContext.Media or .Content has an ItemType property, is that what you need?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to determine the type of file content is linked to?
Hi guys
I am retrieving content using C# code which is working great via the
IPublishedCache
(UmbracoCOntext.Content
andUmbracoContext.Media
)How could i determine what file type is being used as a general document has
in the URL, but a media file has
Ideally i just want to take an action once i have determined the type of file it is.
Was considering to check if the URL contains media or document in the URL but think there must be a better way.
Thanks
The returned value from umbracoContext.Media or .Content has an ItemType property, is that what you need?
is working on a reply...