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