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

(storage) getUrl should support contentDisposition (again; used to) #13326

Open
mitchh opened this issue May 1, 2024 · 2 comments
Open

(storage) getUrl should support contentDisposition (again; used to) #13326

mitchh opened this issue May 1, 2024 · 2 comments
Assignees
Labels
feature-request Request a new feature Storage Related to Storage components/category VP Version parity issues between v5 and v6

Comments

@mitchh
Copy link

mitchh commented May 1, 2024

Is this related to a new or existing framework?

Angular, React, Vue, Next.js

Is this related to a new or existing API?

Storage

Is this related to another service?

No response

Describe the feature you'd like to request

Storage.get used to allow specification of Content-Disposition in the returned URL; in v6 it is no longer possible, with the rationale Content options (contentDisposition, contentLanguage, contentEncoding, and contentType) are no longer supported in the get API as these values are already provided in the uploaded file. While this does apply to most of the other Content-* headers, Content-disposition is not about the content of the file itself, and has other uses. Specifically, consider this comment from the Android SDK:

 * For example, a client could dynamically change the apparent
 * Content-Disposition header of a single object, so that it appears to have a
 * different file name for different callers. One client could be configured
 * return the object with
 *
 * <pre>
 * Content-Disposition: attachment; filename=FileName1.exe
 * </pre>
 *
 * while another could return that same object with headers
 *
 * <pre>
 * Content-Disposition: attachment; filename=FileName2.pdf
 * </pre>
 * ```
 

### Describe the solution you'd like

Add `contentDisposition` (or maybe better yet, a `headers` object that can include `content-disposition`) to `options` in `getUrl`

### Describe alternatives you've considered

Don't have a good alternative ATM

### Additional context

_No response_

### Is this something that you'd be interested in working on?

- [X] 👋 I may be able to implement this feature request
- [ ] ⚠️ This feature might incur a breaking change
@mitchh mitchh added the pending-triage Issue is pending triage label May 1, 2024
@cwomack cwomack self-assigned this May 1, 2024
@cwomack cwomack added Storage Related to Storage components/category feature-request Request a new feature VP Version parity issues between v5 and v6 and removed pending-triage Issue is pending triage labels May 1, 2024
@cwomack
Copy link
Contributor

cwomack commented May 1, 2024

Hello, @mitchh 👋. It indeed is a change from v5 behavior after upgrading to v6 that the contentDisposition (as you noted in the docs here. I'll review this with our team internally, but could you give some further context and use case for this to ensure we understand a broader range of how the contentDisposition option will be used?

@cwomack cwomack added the pending-response Issue is pending response from the issue requestor label May 1, 2024
@mitchh
Copy link
Author

mitchh commented May 3, 2024 via email

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue requestor label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request a new feature Storage Related to Storage components/category VP Version parity issues between v5 and v6
Projects
None yet
Development

No branches or pull requests

2 participants