Upload a file to a Zotero attachment
upload_zotero_fileUpload a local file to an existing Zotero attachment item via the Web API, after creating the attachment with zotero_api. Files with the same MD5 are skipped; limit is 100 MB.
Instructions
Store a local file on an attachment item through the Web API upload flow.
Create the attachment first with zotero_api. A new child attachment uses itemType attachment, linkMode imported_file, parentItem, and contentType. Files already stored with the same MD5 are left unchanged. The upload limit here is 100 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item_key | Yes | 8-character key of an existing imported_file or imported_url attachment. | |
| file_path | Yes | Absolute path of the file on this computer. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | ||
| status | Yes | ||
| message | Yes | ||
| http_status | No | ||
| last_modified_version | No |