Skip to contents

Zenodo has no folders. Its own documentation is explicit: "Zenodo does not support uploading and organising files into folders/directories. Instead, you can create a ZIP archive and upload it, in which case Zenodo will display the file structure inside the ZIP." The API bears this out – the bucket refuses a name containing "/" with a 404, the older form endpoint silently rewrites code/02.R to code_02.R, and a file object carries no path field at all.

Usage

.zenodo_flat_names(files, folder)

Arguments

files

full paths to the files being uploaded

folder

the folder they are inside, stripped from the front

Value

a character vector of names, one per file, all distinct

Details

So a name has to be flat. Using the full relative path for every file makes them needlessly long, when most files in a project have a unique name anyway. This keeps the bare file name wherever it is unambiguous, and only prefixes the ones that would otherwise collide – so analysis.R stays analysis.R, while two README.md files become github__README.md and data__README.md.