Skip to content

Commit 76ca3ec

Browse files
committed
add option for custom fileprovider backend
1 parent 071749f commit 76ca3ec

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fileprovider/middleware.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ def process_response(self, request, response):
6363
filepath = response.get('X-File', "")
6464
if filepath != "" and isinstance(filepath, six.string_types):
6565
provider_name = getattr(settings, "FILEPROVIDER_NAME", "python")
66-
# provider_option = getattr(settings, "DJM_ENABLE_CACHE", True)
67-
provider = PROVIDERS[provider_name]
66+
provider = getattr(settings, "FILEPROVIDER_BACKEND", None)
67+
if not provider:
68+
provider = PROVIDERS[provider_name]
6869
response = provider().get_response(response)
6970
return response

0 commit comments

Comments
 (0)