Revert "Replaced config SCHEME with Flask's own PREFERRED_URL_SCHEME setting."
This reverts commit 8318d4b1f6
.
This commit is contained in:
@@ -364,7 +364,8 @@ def generate_link(backend, file_path: str, project_id=None, is_public=False) ->
|
||||
return blob.get_url(is_public=is_public)
|
||||
|
||||
if backend == 'pillar':
|
||||
return url_for('file_storage.index', file_name=file_path, _external=True)
|
||||
return url_for('file_storage.index', file_name=file_path,
|
||||
_external=True, _scheme=current_app.config['SCHEME'])
|
||||
if backend == 'cdnsun':
|
||||
return hash_file_path(file_path, None)
|
||||
if backend == 'unittest':
|
||||
|
@@ -34,7 +34,7 @@ class LocalBucket(Bucket):
|
||||
|
||||
def copy_blob(self, blob: Blob, to_bucket: Bucket):
|
||||
"""Copies a blob from the current bucket to the other bucket.
|
||||
|
||||
|
||||
Implementations only need to support copying between buckets of the
|
||||
same storage backend.
|
||||
"""
|
||||
@@ -73,7 +73,8 @@ class LocalBlob(Blob):
|
||||
from flask import url_for
|
||||
|
||||
path = self.bucket.bucket_path / self.partial_path
|
||||
url = url_for('file_storage.index', file_name=str(path), _external=True)
|
||||
url = url_for('file_storage.index', file_name=str(path), _external=True,
|
||||
_scheme=current_app.config['SCHEME'])
|
||||
return url
|
||||
|
||||
def create_from_file(self, file_obj: FileType, *,
|
||||
|
Reference in New Issue
Block a user