Closed majorcode closed 7 years ago
Thanks for the PR, issue would solved with #108 which is a better approach, closing this.
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?
This change adds getAuthenticatedDownloadURL(), a variation of getAuthenticatedURL(), with a content disposition added to trigger downloading the object when the URL is opened.