-
Notifications
You must be signed in to change notification settings - Fork 10
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
Saving a file by the name sent by the server #68
Comments
sorry, mistakenly labeled as bug but I guess, it should've been in the feedback/question |
Hey, I also witnessed same thing while using |
Hi @p32929! Thanks for the report. Indeed this behavior is not implemented in trauma, but I agree it could be a good addition. So if you want to tackle it, please go ahead. I am not entirely sure how you would achieve this. My first guess would be to follow the redirect. But there may be other headers that may help. |
The filename is usually provided via the response header field |
Hi, first of all, thanks a lot for creating this package/crate ( I'm kinda new to rust, so ). I was just wondering if there's any way to download a file by the name sent by the server. for instance:
if we try to download file from this link: https://github.com/seanmonstar/reqwest/archive/refs/tags/v0.11.9.zip
it can get the file name & the extension from the URL.
But if we try to download from this link: https://code.visualstudio.com/sha/download?build=stable&os=win32-x64-user
Even though the server sends the file name as
VSCodeUserSetup-x64-1.80.1_2.exe
but it gets saved asdownload
without any extension, like this:here's a screenshot from IDM as it can grab the file name sent by the server:
is there any way I can save the file as the name sent by the server? if not, I'd love to implement the feature and make a pull request. Thanks
The text was updated successfully, but these errors were encountered: