Overview
Gets a file upload token.
Request
Authentication: Add authentication headers to the request. See Authentication
Method:
POST
Rate limit:
100 requests/second
Endpoint: https://API domain/jim/file_cred
Content-Type:
application/json
Request parameters
| Field | type | Description |
|---|---|---|
| file_type | int | 0: default; 1: image; 2: audio; 3: video; 4: file; 5: log. |
| ext | string | File extension. |
Request example
POST /jim/file_cred HTTP/1.1
appkey: appkey
Authorization: xxxxxxxxxxxxxxxxxx
Content-Type: application/json
{
"file_type":0,
"ext":"jpg"
}
Response example
{
"code":0,
"msg":"sucess",
"data":{
"oss_type":0,
"qiniu_resp":{
"domain":"xxxxx",
"token":"xxxxxxx"
},
"pre_sign_resp":{
"url":"xxxxxx",
"obj_key":"xxx",
"policy":"policy",
"sign_version":"xxx",
"credential":"xxxx",
"date":"xxx",
"signature":"xxxx"
}
}
}
Response parameters
| Field | type | Description |
|---|---|---|
| oss_type | int | 0: default; 1: Qiniu; 2: AWS S3; 3: MinIO; 4: OSS. |
Response codes
| Response codes | Description |
|---|