Skip to content
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

Adding GCP support #3367

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions pulpcore/content/handler.py
Expand Up @@ -837,6 +837,12 @@ async def _serve_content_artifact(self, content_artifact, headers, request):
parameters["content_type"] = headers.get("Content-Type")
url = URL(artifact_file.storage.url(artifact_name, parameters=parameters), encoded=True)
raise HTTPFound(url)
elif settings.DEFAULT_FILE_STORAGE == "storages.backends.gcloud.GoogleCloudStorage":
parameters = {"response_disposition": content_disposition}
if headers.get("Content-Type"):
parameters["content_type"] = headers.get("Content-Type")
url = URL(artifact_file.storage.url(artifact_name, parameters=parameters), encoded=True)
raise HTTPFound(url)
else:
raise NotImplementedError()

Expand Down
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -22,6 +22,7 @@
extras_require={
"sftp": ["django-storages[sftp]"],
"s3": ["django-storages[boto3]"],
"google": ["django-storages[google]>1.13.1"],
"azure": ["django-storages[azure]>=1.12.2"],
"prometheus": ["django-prometheus"],
},
Expand Down