Upload file
Upload a new file using multipart form data.
AuthorizationBasic <token>
WordPress Application Password authentication. Generate one at wp-admin > Users > Application Passwords. Use as Basic Auth with username:application_password (base64-encoded).
In: header
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://your-site.com/wp-json/fluent-cart/v2/files/upload" \ -F file="string"{
"file": {
"id": 0,
"file_name": "string",
"file_path": "string",
"file_url": "http://example.com",
"file_size": 0,
"file_type": "string",
"storage_driver": "string",
"is_public": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
},
"message": "string"
}{
"code": "rest_forbidden",
"message": "Sorry, you are not allowed to do that.",
"data": {
"status": 401
}
}