Skip to content

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