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

feat(upload): respect content-disposition response header during download #2168

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

HuakunShen
Copy link

@HuakunShen HuakunShen commented Dec 9, 2024

Original Issue: #2166

The download function requires a custom save path.

When downloading a file from an url like http://localhost:9559/file.txt we know the filename is file.txt.
However, when url doesn't contain filename, we don't know what the original filename is.
Normally in a browser, adding response header content-disposition: "attachment; filename=file.txt" teaches the browser what the downloaded file should be named, but there is not an option in the plugin.

Suggestion:
When filePath passed in is a directory, use the inferred filename.
Currently if a directory is passed in, an error is thrown.

@HuakunShen HuakunShen requested a review from a team as a code owner December 9, 2024 08:18
Copy link
Contributor

github-actions bot commented Dec 9, 2024

Package Changes Through 0c4f1b4

There are 2 changes which include log with patch, log-js with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
api-example 2.0.6 2.0.7
api-example-js 2.0.3 2.0.4
log 2.0.3 2.0.4
log-js 2.0.1 2.0.2

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

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.

1 participant