AUS-34 adds document upload support for provenance submissions. Curators can now attach supporting files (certificates, auction catalogs, gallery receipts, condition reports) when submitting or updating provenance for exhibition piece products.
includes/class-document-tracker.php — New class handling file uploads, validation, storage, and CRUD operationsincludes/class-database-migration.php — Schema bumped to 0.2.0, added ausstell_documents tableincludes/class-api-router.php — Added 3 REST endpoints for document operationsincludes/class-product-type.php — Added upload UI in admin panel + document display on frontendadmin/class-curator-dashboard.php — Added 3 AJAX handlers for upload/get/deleteadmin/js/admin.js — Added document upload/delete UI logicausstellungsstuecke.php — Added DocumentTracker require| Method | Endpoint | Permission | Description |
|---|---|---|---|
| POST | /wp-json/ausstell/v1/documents/{product_id} | edit_products | Upload document(s) |
| GET | /wp-json/ausstell/v1/documents/{product_id} | edit_products | List documents for product |
| DELETE | /wp-json/ausstell/v1/documents/{id} | edit_products | Delete document by ID |
finfo_file() (not trusting client-provided MIME)/uploads/ausstell-documents/product_{id}/ (not web root)edit_products required for all operationsOn the WooCommerce product edit screen (Provenance & Auth tab), curators see:
On the product page (exhibition piece products with provenance data), supporting documents are listed below the provenance details section, with type icon, filename, type label, and file size. Links open in a new tab.
Database schema version bumped from 0.1.0 to 0.2.0. The migration runs automatically on plugin activation and adds the new ausstell_documents table alongside existing tables.