Skip to content

v1.13.1

Latest

Choose a tag to compare

@github-actions github-actions released this 08 Jun 20:55
· 4 commits to main since this release
Send If-Match at register-upload step for existing files (#322)

_register_upload hardcoded If-None-Match: * regardless of whether the
file was new or an update, so replacing an existing attachment's
contents made the Zotero API return 412 ("If-None-Match: * set but file
exists"). _get_auth (Step 1) already branched on md5; thread that same
md5 through _upload_file to _register_upload (Step 3) and branch on it.

Per the Zotero file upload API, Step 3 must use If-Match: <previous md5>
for existing files and If-None-Match: * for new ones. Adds tests for both
cases.