upload_attachment
Upload local files to the POS as File documents, optionally attach to records and set privacy for WooCommerce product photo sideloading.
Instructions
Upload a LOCAL file to the POS as a File document, optionally attached to a document (doctype + name) and/or set into its Attach field (fieldname). Returns the File doc incl. file_url. Default is_private=true — product photos that WooCommerce must sideload need is_private=false. For bulk photo+gallery imports prefer the firearm-listing-import script (it resizes images first; oversized originals break the Woo push).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| doctype | No | ||
| fieldname | No | ||
| file_path | Yes | ||
| is_private | No |