strapi-provider-upload-azure-storage
strapi-provider-upload-azure-storage copied to clipboard
403 (Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.)
Hello, I hope you're all fine.
I have a bug when I try to download a media from the media library. My Azure config seems fine since I can upload media to my azure storage.
I can provide a screenshot of the query
Thank you for your answers :)
Hello @walterspieler, thanks for reporting. I would need to do some testing to see how strapi is trying to download. Will you confirm that your access key has sufficient perms to allow downloads?
Hello @jakeFeldman, Sorry i only see this message now. Yes I am Admin on Strapi side and I have all rights in storage. I use the Access key. I even tried with a signature (Shared Access Signature) w/ everything checked
Sorry for the delay. I've been very busy at work ad have not had the time to work on this package. I'm looking for someone to help maintain the package.
The problem is that Strapi send the strapi bearer token to the storage url since the latest update.
In your associated .env file, you need to add the following: STORAGE_ACCOUNT_SAS_TOKEN=
The problem in the code is this line:
if (sasToken != '') {
It's specifically looking for a blank value. In my case, I didn't put that value into the .env and I'm assuming that it's determined to be a null value. Thus, the code within the if statement is always run.
I did try putting in a value for "STORAGE_ACCOUNT_SAS_TOKEN" as well, but that didn't work either. Anyhow, it works now with the accountKey.
I'm having the same issue. When clicking download, wouldn't it be easier to just open the download link in a new tab?