POST /core/temp-file
Upload temp file for preparingThis API is to upload a file and temporarily save it on server for the next action.
Example URI
Code Block | ||||
---|---|---|---|---|
| ||||
http://example.com/restful_api/core/temp-file/?type=blog |
Parameters
Parameter | Type | Required ? | Description |
---|---|---|---|
type | String | Yes | App alias/Module id - This is query string |
id | Integer | No | Item id (etc: blog id) - This is request body |
file | File | Yes | File need to upload - This is request body and default name for upload file. Each app/module maybe define param_name in getUploadParams callback, so you need to follow this to make sure the upload file name is right |
Response
Code Block | ||||
---|---|---|---|---|
| ||||
{ "status": "success", "data": { "file" : 776, "type" : "blog", "field_name" : "temp_file" }, "message": "", "error": null } |