mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-27 04:19:04 +08:00
Update ClientStorageController.cs (#8059)
Fixes an issue caused by replacing a media file by another file with a different fileName that resulted in a wrong filename for the new file.
This commit is contained in:
committed by
Sébastien Ros
parent
1f77745888
commit
73316590ac
@@ -194,7 +194,7 @@ namespace Orchard.MediaLibrary.Controllers {
|
||||
// it changes the media file name
|
||||
replaceMedia.FileName = filename;
|
||||
}
|
||||
_mediaLibraryService.UploadMediaFile(replaceMedia.FolderPath, filename, file.InputStream);
|
||||
_mediaLibraryService.UploadMediaFile(replaceMedia.FolderPath, replaceMedia.FileName, file.InputStream);
|
||||
replaceMedia.MimeType = mimeType;
|
||||
|
||||
_handlers.Invoke(x => x.Updated(new UpdateContentContext(replaceMedia.ContentItem)), Logger);
|
||||
@@ -226,4 +226,4 @@ namespace Orchard.MediaLibrary.Controllers {
|
||||
return Json(statuses, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user