mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-03 03:58:13 +08:00
#18257: Fixing HttpContent encapsulation while enumerating files
Work Item: 18257 --HG-- branch : 1.x
This commit is contained in:
@@ -108,14 +108,13 @@ namespace Orchard.Azure {
|
||||
if ( !prefix.EndsWith("/") )
|
||||
prefix += "/";
|
||||
|
||||
using ( new HttpContextWeaver() ) {
|
||||
foreach (var blobItem in BlobClient.ListBlobsWithPrefix(prefix).OfType<CloudBlockBlob>()) {
|
||||
// ignore directory entries
|
||||
if(blobItem.Uri.AbsoluteUri.EndsWith(FolderEntry))
|
||||
continue;
|
||||
|
||||
yield return new AzureBlobFileStorage(blobItem, _absoluteRoot);
|
||||
}
|
||||
using (new HttpContextWeaver()) {
|
||||
return BlobClient
|
||||
.ListBlobsWithPrefix(prefix)
|
||||
.OfType<CloudBlockBlob>()
|
||||
.Where(blobItem => !blobItem.Uri.AbsoluteUri.EndsWith(FolderEntry))
|
||||
.Select(blobItem => new AzureBlobFileStorage(blobItem, _absoluteRoot))
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user