Skip to content

File upload

POST v1/api/user

Request

namenecessarytypedefaultdescribe
filetruefile-文件(file)
prefixfalsestring-存储文件夹路径(storage folder path)

Response data struct

namenecessarytypedefaultdescribe
codetrueint-错误码(error code)
messagetruestring-错误信息(error message)
causetruestring-错误原因(error cause)
detailstrueobject-详情(details)
-urltruestring-链接(url)

Example

  • Body of form-data:
keyvalue
filexxx.jpeg
prefixuser
  • Header:
keyvalue
x-api-keyyour's key value
  • Response body:
json
{
    "code": 0,
    "message": "Success",
    "cause": "",
    "details": {
        "url": "https://xxx.com/user/avatar/20220814142433a6f4GbYB.png"
    }
}
{
    "code": 0,
    "message": "Success",
    "cause": "",
    "details": {
        "url": "https://xxx.com/user/avatar/20220814142433a6f4GbYB.png"
    }
}