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

Rework downloading web files re naming #95

Open
MrCreosote opened this issue Mar 12, 2024 · 0 comments
Open

Rework downloading web files re naming #95

MrCreosote opened this issue Mar 12, 2024 · 0 comments

Comments

@MrCreosote
Copy link
Member

Currently the code does

  • GET to the source to get the content distribution header, which I assume will also start (and maybe finish) pulling the file from the source
  • Inspects the content-distribution header to get the file name
  • Otherwise gets the name from the URL
  • does another GET to the source using wget to download the file.

Instead

  • Use a temporary file name like a UUID
  • Download the file
  • Figure out the filename as above
  • rename the file

Result: 1 less GET

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

No branches or pull requests

1 participant