OpenRefine / OpenRefine/OpenRefine
Preserve Content-Disposition filename
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12k
- Forks
- 2.2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 27
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing project creation from a URL through the response-header handling and importer selection; the issue provides a Content-Disposition example but names no files or tests. Use the smaller OpenRefine URL example to verify that its filename is preserved and can inform importer choice.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100