I'd recommend you to install the uComponents package by Lee Kelleher. This package's got some neat methods when working with Media items. In your case you could do something like this (untested code):
List<Media> results = GetMediaByName("YourDocumentName");
if(results.Count > 0)
{
// You have a match
}
else
{
// There's no Media folder with that name
}
how do I check if media folder is existing.
Is there a way to check if the media folder is existing? because I want to add the media folder whenever I add a document content.
Hi Sherry,
I'd recommend you to install the uComponents package by Lee Kelleher. This package's got some neat methods when working with Media items. In your case you could do something like this (untested code):
Let me know if it works :-)
Thanks,
- Bo
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.