mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
#20453: Adding Clone Button to Media Library
#20453: Fixing Formatting Issues #20453: Adding Clone Button to Media Library Work Item: 20453 Conflicts: src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/AdminController.cs src/Orchard.Web/Modules/Orchard.MediaLibrary/Scripts/media-library.js
This commit is contained in:
committed by
Stanley Goldman
parent
b50ae151bd
commit
e90001605d
@@ -261,6 +261,18 @@ namespace Orchard.Azure.Services.FileSystems {
|
||||
blob.Delete();
|
||||
}
|
||||
|
||||
public void CopyFile(string path, string newPath) {
|
||||
path = ConvertToRelativeUriPath(path);
|
||||
newPath = ConvertToRelativeUriPath(newPath);
|
||||
|
||||
Container.EnsureBlobExists(String.Concat(_root, path));
|
||||
Container.EnsureBlobDoesNotExist(String.Concat(_root, newPath));
|
||||
|
||||
var blob = Container.GetBlockBlobReference(String.Concat(_root, path));
|
||||
var newBlob = Container.GetBlockBlobReference(String.Concat(_root, newPath));
|
||||
newBlob.StartCopyFromBlob(blob);
|
||||
}
|
||||
|
||||
public IStorageFile CreateFile(string path) {
|
||||
path = ConvertToRelativeUriPath(path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user