Closed mz-andrewpotts closed 3 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@mz-andrewpotts Sorry for the delayed response. Please recheck your issue against the latest version of the Azure package and if you encounter the problem, we'll appreciate accepting your pull request.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Problem
We migrated from the DiskBlobStorageProvider (files stored on the server's local disk) to AzureBlobStorageProvider (Azure blobs).
In doing so, we copied the files that already existed to an identical folder structure in Blob. However, there is an incompatibility between the two providers. This means that previously saved files cannot be read - it results in the BlobNotFound exception.
Analysis
The DiskBlobStorageProvider appends the file extension but AzureBlobStorageProvider doesn't.
It would be good for both to be identical so there is a seamless migration between the two providers.
Workaround
I have created a copy of the Olive.Blob.Azure project and replaced all lines that execute:
var key = document.GetKey();
with a function that returns:
document.FolderName + "/" + document.OwnerId() + document.FileExtension;
but it would be good to get this fix pushed into the main codebase.