- Create an access token at "https://zenodo.org/account/settings/applications/tokens/new/" with the "deposit:write" and "deposit:actions" scopes, and keep it somewhere safe (we'll refer to this token as ZENODO_TOKEN)
- Create your deposit via the web interface at "https://zenodo.org/deposit/new", fill in the minimum metadata (title, authors, description, access rights and license) and click "Save".
- On your browser's URL, you will now see the deposit ID in the form "https://zenodo/deposit/".
- Next step is to get the file upload URL. Via curl (or your HTTP client of preference) you can do:
$ # Store the Zenodo token in an envionrment variable
$ read -s ZENODO_TOKEN
$ curl "https://zenodo.org/api/deposit/depositions/222761?access_token=${ZENODO_TOKEN}"
{ ...
"links": { "bucket": "https://zenodo.org/api/files/568377dd-daf8-4235-85e1-a56011ad454b", ... },
... }
- Now you can use the URL from the
links.bucket
field from the response, and perform the following request to upload your file:
# This does a file stream PUT request to the "links.bucket" link
$ curl --upload-file "/path/to/your/file.dat" "https://zenodo.org/api/files/568377dd-daf8-4235-85e1-a56011ad454b/file.dat?access_token=${ZENODO_TOKEN}"
{ ... }
- After the upload has finished, you can click the "Publish" button on the upload's page.
Thank you for this great writeup! One small addition, to show progress meter with large uploads, modify the upload command with
-o upload.txt
, so:This is based on man for the PROGRESS METER,
To show a progress bar instead of the progress meter, also use the
--progress-bar
option.To upload multiple files (e.g. bunch of zip files in a folder), do:
for %i in (*.zip) do curl ...
and use%i
instead of the filename in the curl command.