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

doesn't use the content-disposition header in all cases #25

Open
vincenzoml opened this issue Oct 7, 2024 · 2 comments · May be fixed by #27
Open

doesn't use the content-disposition header in all cases #25

vincenzoml opened this issue Oct 7, 2024 · 2 comments · May be fixed by #27

Comments

@vincenzoml
Copy link

I try to download zip sources from a github url, e.g. https://codeload.github.com/andresusanto/easydl/zip/refs/heads/master but the file is just called "master" (I tried with another repo actually and it was called "main"). If I print the content-disposition header in the .on("metadata",...) method, I see the correct file name, but dl.savedFilePath is just the name of the branch.

@slhck
Copy link

slhck commented Dec 17, 2024

This feature is not implemented. I think the problem is that the final target file name would then only be known once the metadata is received (i.e., the headers), and so the final filename is not available. The issue is that the _ensureDest method is being called too early in the process, before we have the headers.

@slhck
Copy link

slhck commented Dec 17, 2024

Should be supported by #27 — if you pass a target dir it will fetch the headers and infer the filename from the content disposition headers, if available. It will fallback to the last path component.

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 a pull request may close this issue.

2 participants