Upload one file for an ATTACHMENT or HTML_EDITOR field.
POST
/erupt-api/file/upload/{erupt}/{field}
Multipart form field "file". Extension, size and image dimensions are checked against @AttachmentType; the stored path is returned and is what the record field should hold.
授权
tokenHeader
Login token from POST /erupt-api/login, or from /erupt-api/open-api/create-token for server-to-server calls.
类型
API Key (header: token)
参数
请求头参数
erupt*
Name of the @Erupt class the request is scoped to. Must match the {erupt} path segment, or name the parent erupt when the path addresses a nested erupt (tab, sub-form, reference).
类型
必填string
格式
"string"路径参数
erupt*
Simple class name of the @Erupt model
类型
必填string
格式
"string"field*
Field name with edit type ATTACHMENT or HTML_EDITOR
类型
必填string
格式
"string"请求体
multipart/form-data
File to store
格式
"binary"响应
OK
*/*
JSON "data": "string", "message": "string", "success": true, "status": "SUCCESS", "promptWay": "DIALOG"
{
}