mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Merge pull request #5485 from jersiovic/patch-1
Issue #5061 GetImageProfileUrl reprocess images obtained through a dynamic profile on every restart 1.9.x pull request
This commit is contained in:
@@ -64,6 +64,16 @@ namespace Orchard.MediaProcessing.Services {
|
||||
var filePath = _fileNameProvider.GetFileName(profileName, System.Web.HttpUtility.UrlDecode(path));
|
||||
bool process = false;
|
||||
|
||||
//after reboot the app cache is empty so we reload the image in the cache if it exists in the _Profiles folder
|
||||
if (string.IsNullOrEmpty(filePath)) {
|
||||
var profileFilePath = _storageProvider.Combine("_Profiles", FormatProfilePath(profileName, System.Web.HttpUtility.UrlDecode(path)));
|
||||
|
||||
if (_storageProvider.FileExists(profileFilePath)) {
|
||||
_fileNameProvider.UpdateFileName(profileName, System.Web.HttpUtility.UrlDecode(path), profileFilePath);
|
||||
filePath = profileFilePath;
|
||||
}
|
||||
}
|
||||
|
||||
// if the filename is not cached, process it
|
||||
if (string.IsNullOrEmpty(filePath)) {
|
||||
Logger.Debug("FilePath is null, processing required, profile {0} for image {1}", profileName, path);
|
||||
|
||||
Reference in New Issue
Block a user