Skip to content

Honor Accept header when downloading directories #41037

Closed
@maxnoe

Description

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

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

The file format one gets when downloading a directory seems to depend on the HTTP User-Agent and does not honor the Accept header.

macos user agents seem to get tar files, while everyone else gets zip files.

This makes it hard to write instructions to e.g. download files and unpack them via the command line (e.g. curl / wget) that are valid cross platform.

Describe the solution you'd like

It would be great if Nextcloud would honor the Accept header when downloading a directory, so that e.g. it is guaranteed that:

$ curl -LO -H 'Accept: application/x-tar' <share-link>
# or
$ curl -LO -H 'Accept: application/zip' <share-link>

always produces a tar file and a zip file respectively, independent of platform / user agent.

Describe alternatives you've considered

A possible alternative would be a query parameter for the filetype.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions