You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.