Closed bs2603 closed 11 months ago
Hi,
I've added the changes you suggested and have run yarn lint --format
.
Let me know if there's anything else needed.
Thank you for your guidance!
Thanks again for the PR. I've published version 3.3.0 and this should be available on npm now.
Thank you!
Hi,
I have a strapi and next.js (frontend) based website. I recently migrated its data to an azure container, and came across this issue.
Issue
When uploading an image to the strapi admin dashboard, the image would get uploaded to azure, but the thumbnail wasn't visible for preview
Right click, open image in new tab showed
BlobNotFound
error -Page URL -
my_azure_account/data/brands/thumbnail_image_optimization_c467bd6cd4.webp?width=900&height=600
Please note that the image was getting uploaded correctly to the container, only the preview wasn't available.
Reason
The reason behind this error was that the plugin was adding
Container Name
to the generated URL. While the actual image was getting uploaded to the same URL, without the container name in it.Page URL -
my_azure_account/data/brands/thumbnail_image_optimization_c467bd6cd4.webp?width=900&height=600
Image correctly uploaded at -
my_azure_account/brands/thumbnail_image_optimization_c467bd6cd4.webp?width=900&height=600
Solution
Due to other team regulations, I cannot change settings on my azure portal. I believe there would be other users who would encounter a similar problem in the future. Thus I have added an optional check.
removeCN
which can be set totrue
.handleUpload
function to check whether the parameter exists and is true, and simply removes the substring with container name -I have compiled the code on my local system and checked it, it works correctly with no errors.I have tried to maintain continuity and readability in the code, let me know if there is any issue.
Regards, Bhavya bhavyas2603@gmail.com