-
-
Notifications
You must be signed in to change notification settings - Fork 863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure backend : unable to determine account name for shared key credential #1082
Comments
I was using version 1.12.2. It seems the fix for AZURE_CUSTOM_DOMAIN (1076) still doesn't behave like 1.11. I just rolled back to version 1.11 and it works. |
Looks as though the SDK tries to infer the account name from the URL, which is not going to work for custom URLs. But it looks as though you can provide it explicitly, I think this should do the trick: diff --git a/storages/backends/azure_storage.py b/storages/backends/azure_storage.py
index 23509a5..f8e242a 100644
--- a/storages/backends/azure_storage.py
+++ b/storages/backends/azure_storage.py
@@ -158,7 +158,10 @@ class AzureStorage(BaseStorage):
credential = None
if self.account_key:
- credential = self.account_key
+ credential = {
+ "account_name": self.account_name,
+ "account_key": self.account_key,
+ }
elif self.sas_token:
credential = self.sas_token
elif self.token_credential: Are you able to try that? |
Thx for me it is working, can we patch it for future releases? |
Hi!
I'm trying to configure django-storages[azure] backend without success. In settings, I configured these variables:
I get the following error
Not sure what happens. Am I missing something ?
The text was updated successfully, but these errors were encountered: