Skip to content

Preserve Content-Disposition filename #2815

@tfmorris

Description

@tfmorris

When creating a project from a URL which is a generic address (e.g. "download"), the Content-Disposition header may have a better filename to use as the starting point for the project than the URL. In the example from #2593, https://usace.contentdm.oclc.org/digital/api/collection/p16021coll2/id/4706/download
https://usace.contentdm.oclc.org/digital/api/collection/p16021coll2/id/2106/download
has

Content-Disposition: attachment; filename="p16021coll2_2106.xlsx"

which both gives us a better name and a hint at the importer to use.

Edit: The original example was 400MB uncompressed which doesn't make for a very tractable example, so I've replaced it with a smaller file from the same site.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: Feature RequestIdentifies requests for new features or enhancements. These involve proposing new improvements.importAbout importers in general - add a label for the data format if available

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions