postMultipart() HTTP method.
Methods
| Method | Description |
|---|---|
upload(file) | Upload a file |
list(query?) | List uploaded files |
get(fileId) | Get a file by ID |
delete(fileId) | Delete a file |
Upload a file
Theupload()method uses multipart form data. Pass aFormDataobject containing the file.
List files
Get a file
Delete a file
Response types
UploadResponse
| Field | Type | Description |
|---|---|---|
id | string | File ID |
name | string | File name |
size | number | File size in bytes |
url | string | File URL |
created_at | string | ISO timestamp |
ListResponse
An array of file objects withid, name, size, url, and created_at fields.
GetResponse
Same shape asUploadResponse.