mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing storage client issue for Azure
--HG-- branch : 1.x
This commit is contained in:
@@ -345,11 +345,15 @@ namespace Orchard.Azure {
|
||||
}
|
||||
|
||||
public string GetPath() {
|
||||
return _blob.Uri.ToString().Substring(_rootPath.Length).Trim('/');
|
||||
using (new HttpContextWeaver()) {
|
||||
return _blob.Uri.ToString().Substring(_rootPath.Length).Trim('/');
|
||||
}
|
||||
}
|
||||
|
||||
public long GetSize() {
|
||||
return GetDirectorySize(_blob);
|
||||
using (new HttpContextWeaver()) {
|
||||
return GetDirectorySize(_blob);
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime GetLastUpdated() {
|
||||
@@ -357,8 +361,10 @@ namespace Orchard.Azure {
|
||||
}
|
||||
|
||||
public IStorageFolder GetParent() {
|
||||
if ( _blob.Parent != null ) {
|
||||
return new AzureBlobFolderStorage(_blob.Parent, _rootPath);
|
||||
using (new HttpContextWeaver()) {
|
||||
if (_blob.Parent != null) {
|
||||
return new AzureBlobFolderStorage(_blob.Parent, _rootPath);
|
||||
}
|
||||
}
|
||||
throw new ArgumentException("Directory " + _blob.Uri + " does not have a parent directory");
|
||||
}
|
||||
|
Reference in New Issue
Block a user