Geeksltd / Olive

Olive framework, for more productive cross platform .NET solutions. It's available under the GPL v3 license. See License.md for more information.
https://geeksltd.github.io/Olive
Other
44 stars 44 forks source link

Azure Blob files missing document extension #296

Closed mz-andrewpotts closed 3 years ago

mz-andrewpotts commented 3 years ago

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.

stale[bot] commented 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.

m-sadegh-sh commented 3 years ago

@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.

stale[bot] commented 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.