v1

latestOpenAPI 3.0.02026-07-2638801.8 MB
attachments

Retrieve upload signature.

post/attachments/signature

Request body

contentTypestring required

Mime type

contentLengthnumber required

File size

expiresInnumber

Token expire time, seconds

hashstring

File hash

type1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 required

Type

baseIdstring

Example request

{
  "contentType": "image/png",
  "contentLength": 123,
  "expiresIn": 3600,
  "hash": "xxxxxxxx",
  "type": 1
}

Response

return the upload URL and the key.

urlstring required

Upload url

uploadMethodstring required

Upload method

tokenstring required

Secret key

requestHeadersobject required

Example response

{
  "url": "https://example.com/attachment/upload",
  "uploadMethod": "POST",
  "token": "xxxxxxxx",
  "requestHeaders": {
    "Content-Type": "image/png"
  }
}