download file from concept DOI
Is your feature request related to a problem? Please describe.
For a record with multiple versions, but the same file structure in each version, I'd like an easy location from which to download a specific file, but always from the latest version of the record.
Describe the solution you'd like
Consider a record with concept ID 12345 and a specific version having ID 12346, which is the latest version.
Currently I can get test_file.txt from the specific version at the URL zenodo.org/record/12346/files/test_file.txt. However, if I try the same from the concept ID, to automatically get the latest version, the redirect goes as follows:
zenodo.org/record/12345/files/test_file.txt -> zenodo.org/record/12346
That is, the last part of the URL files/test_file.txt is discarded during the redirect.
I think it would probably be super easy to just change the redirect to preserve the trailing portion of the URL, and then getting the above URL would always yield the most recent version of the file!
Additional context
To give a bit of context, I'd like to store container (Docker) images of my software library on Zenodo, so that each software version and build is preserved for reproducible studies. It would be very convenient for my users if there were a single URL from which they could fetch the docker image corresponding to the most recent release of the software package.
edit: I just saw #2417; while I think what I ask for here would be a great addition to Zenodo, having full-fledged support for containers would be great for my specific use case!
What if that file does not exist anymore in a newer version of the record?
What if that file does not exist anymore in a newer version of the record?
I think the behavior should mirror exactly the behavior if the most recent version is queried directly---so it should yield "file not found" in that case, just as it would if you requested that file from the most recent version. (This is just a design decision, but I think this is the best choice for that design).