List Files
GET /api/v1/files
Filter by type (1=images, 2=other), filepath, search.
Get File
GET /api/v1/files/{id}
Returns metadata including full URL.
List Directories
GET /api/v1/files/directories
Upload (multipart)
curl -X POST -H "Authorization: Bearer KEY:SECRET"
-F "file=@/path/to/image.jpg"
-F "filepath=products/"
-F "description=Product hero image"
https://example.com/api/v1/files
Upload (base64 JSON)
curl -X POST -H "Authorization: Bearer KEY:SECRET"
-H "Content-Type: application/json"
-d '{"filename": "banner.png", "filepath": "banners/", "content": "iVBORw0KGgo...", "mimetype": "image/png"}'
https://example.com/api/v1/files
Delete File
DELETE /api/v1/files/{id}
Removes the file from disk, the database record, and any product image assignments.