I'm working on an Umbraco project, and my requirement is to pick PDF files from the Umbraco admin panel. I've tried multi url picker for Umbraco package but it doesn't work properly.
Is there any way to pick and upload PDF files?
I'm working on an Umbraco project, and my requirement is to pick PDF files from the Umbraco admin panel. I've tried multi url picker for Umbraco package but it doesn't work properly.
Is there any way to pick and upload PDF files?
Assuming the PDF files are in the Media section of Umbraco, you can use the Multiple Media Picker editor that comes with Umbraco to pick the PDF files.
Calling @Umbraco.Field("multipleMediaPickerPropertyAlias")
in your template will return a comma separated list of Media item ids. You can use this and UmbracoHelper.Media
method to get an list of Media items as follows:
@if (CurrentPage.HasValue("multipleMediaPickerTest"))
{
var mediaItemIdList = CurrentPage.multipleMediaPickerTest.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
var mediaItems = Umbraco.Media(mediaItemIdList);
foreach (var mediaItem in mediaItems)
{
<a href="@mediaItem.Url">@mediaItem.Name</a><br>
}
}