diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/Media.SummaryAdmin.cshtml b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/Media.SummaryAdmin.cshtml index 017bcaa3e..d0fe8c705 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/Media.SummaryAdmin.cshtml +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/Media.SummaryAdmin.cshtml @@ -11,7 +11,7 @@ @if (HasText(mediaUrl)) {
@T("Filename:") - @Path.GetFileName(mediaUrl) + @HttpUtility.UrlDecode(Path.GetFileName(mediaUrl))
}
diff --git a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Services/ImageProfileManager.cs b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Services/ImageProfileManager.cs index 480959317..d572c053b 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Services/ImageProfileManager.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Services/ImageProfileManager.cs @@ -58,8 +58,10 @@ namespace Orchard.MediaProcessing.Services { public string GetImageProfileUrl(string path, string profileName, FilterRecord customFilter, ContentItem contentItem) { + // path is the publicUrl of the media, so it might contain url-encoded chars + // try to load the processed filename from cache - var filePath = _fileNameProvider.GetFileName(profileName, path); + var filePath = _fileNameProvider.GetFileName(profileName, System.Web.HttpUtility.UrlDecode(path)); bool process = false; // if the filename is not cached, process it