Skip to content

Commit 2a5c691

Browse files
committed
Revert "Add handling and logging for blobs that not block type"
This reverts commit 52784cf.
1 parent 52784cf commit 2a5c691

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -783,19 +783,11 @@ private CloudBlockBlob GetBlockBlobReference(string path)
783783

784784
string blobPath = this.FixPath(path);
785785

786-
var blobReference = this.cloudBlobContainer.GetBlobReferenceFromServer(blobPath);
787786
// Only make the request if there is an actual path. See issue 8.
788787
// https://github.com/JimBobSquarePants/UmbracoFileSystemProviders.Azure/issues/8
789-
if (blobReference.BlobType == BlobType.BlockBlob && !string.IsNullOrWhiteSpace(path))
790-
{
791-
return blobReference as CloudBlockBlob;
792-
}
793-
else
794-
{
795-
Current.Logger.Error<AzureBlobFileSystem>($"A media item '{path}' was requested but it's blob type was {blobReference.BlobType} when it should be BlockBlob");
796-
return null;
797-
}
798-
788+
return !string.IsNullOrWhiteSpace(path)
789+
? this.cloudBlobContainer.GetBlockBlobReference(blobPath)
790+
: null;
799791
}
800792

801793
/// <summary>

0 commit comments

Comments
 (0)