#20598: Fixing thumbnail generation

Work Item: 20598
This commit is contained in:
Sebastien Ros 2014-05-02 10:41:00 -07:00
parent c6b6cb1a98
commit 1186185461
2 changed files with 4 additions and 2 deletions

View File

@ -11,7 +11,7 @@
@if (HasText(mediaUrl)) {
<div class="file-name">
<em>@T("Filename:")</em>
<span><a href="@mediaUrl">@Path.GetFileName(mediaUrl)</a></span>
<span><a href="@mediaUrl">@HttpUtility.UrlDecode(Path.GetFileName(mediaUrl))</a></span>
</div>
}
<div class="mime-type">

View File

@ -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