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

New function to get an authenticated object URL for download. #125

Closed
wants to merge 1 commit into from

Conversation

majorcode
Copy link

This change adds getAuthenticatedDownloadURL(), a variation of getAuthenticatedURL(), with a content disposition added to trigger downloading the object when the URL is opened.

This change adds getAuthenticatedDownloadURL(), a variation of getAuthenticatedURL(), with a content disposition added to trigger downloading the object when the URL is opened.
@tpyo
Copy link
Owner

tpyo commented Mar 14, 2017

Thanks for the PR, issue would solved with #108 which is a better approach, closing this.

@tpyo tpyo closed this Mar 14, 2017
@majorcode
Copy link
Author

Is it really a better approach? I like the additional parameter for custom headers. But, the additional, noisy syntax required to include custom headers is not as simple when you're really just interested in getting a URL that'll trigger a download--something I think would be a common desire. I think having a function named getAuthenticatedDownloadURL is friendly API design.

I admit that my patch caused duplication. It was important to me to avoid touching your original code. I considered adding something like #108, but I liked the fully named function for ease of use.

Why not add a function named getAuthenticatedDownloadURL which calls the new function from #108 with the same signature and merges in the content disposition header?

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.

2 participants