diff --git a/django_storage_url/backends/az.py b/django_storage_url/backends/az.py index a9ed93e..5a7f479 100644 --- a/django_storage_url/backends/az.py +++ b/django_storage_url/backends/az.py @@ -3,6 +3,7 @@ import furl from storages.backends import azure_storage +from django.conf import settings class AzureStorageFile(azure_storage.AzureStorageFile): @@ -56,7 +57,8 @@ def __init__(self, dsn): self.azure_container = container_name self.azure_ssl = secure_urls self.max_memory_size = 10 * 1024**2 - self.overwrite_files = True + # The default is False in the superclass + self.overwrite_files = getattr(settings, "AZURE_OVERWRITE_FILES", True) self.location = "" self.base_url = str(base_url)