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

hint client of download filename #937

Closed
alambare opened this issue Nov 23, 2023 · 2 comments
Closed

hint client of download filename #937

alambare opened this issue Nov 23, 2023 · 2 comments
Labels
enhancement New feature or request server Server-mode related

Comments

@alambare
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

Currently EODAG server does not give the filename when downloading data.

For example, the following command will download and name it "download".

wget http://localhost:8000/collections/S1_SAR_GRD/items/S1A_IW_GRDH_1SDV_20230831T234123_20230831T234152_050126_060852_FA06/download"

Describe the solution you'd like
A clear and concise description of what you want to happen.

Add the "Content-Disposition" header in download request response to hint the client of the filename.

Content-Disposition: attachment; filename="S1A_IW_GRDH_1SDV_20230831T234123_20230831T234152_050126_060852_FA06.zip"

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

We could also update URLs to look like the following instead. Or we could do both (header + URL).

http://localhost:8000/collections/S1_SAR_GRD/items/S1A_IW_GRDH_1SDV_20230831T234123_20230831T234152_050126_060852_FA06/download/S1A_IW_GRDH_1SDV_20230831T234123_20230831T234152_050126_060852_FA06.zip"

Additional context
Add any other context about the feature request here.

@alambare alambare added enhancement New feature or request server Server-mode related labels Nov 23, 2023
@sbrunato
Copy link
Collaborator

The "Content-Disposition" header is already used, but not implemented for all the download plugins. We should make sure it is

@sbrunato
Copy link
Collaborator

sbrunato commented Nov 27, 2023

asset subset download will already use the {item}/download/{key} url pattern. See #889 and #932

Please use wget --content-disposition to make wget read filename from headers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server Server-mode related
Projects
None yet
Development

No branches or pull requests

2 participants