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

Fixed azure artifacts path download. #1194

Merged
merged 1 commit into from Mar 23, 2021
Merged

Conversation

ipanova
Copy link
Member

@ipanova ipanova commented Mar 19, 2021

closes #8427
https://pulp.plan.io/issues/8427

Please be sure you have read our documentation on creating PRs:
https://docs.pulpproject.org/contributing/pull-request-walkthrough.html

artifact_file = content_artifact.artifact.file
content_disposition = f"attachment;filename={content_artifact.relative_path}"
parameters = {"ResponseContentDisposition": content_disposition}
url = artifact_file.storage.url(artifact_file.name, parameters=parameters)
raise HTTPFound(url)
elif settings.DEFAULT_FILE_STORAGE == "storages.backends.azure_storage.AzureStorage":
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would think so but I am not familiar with Azure and I haven't tested with it at all.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I am not familiar with Azure either. I wanted to finalize this community contribution. Can we merge this as-is and add/fix content-disposition support later on whenever we receive a bug?Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good to me.

@pulpbot
Copy link
Member

pulpbot commented Mar 19, 2021

Attached issue: https://pulp.plan.io/issues/8427

Copy link
Member

@goosemania goosemania left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants