# Upload Large Files Initialization
# API Description
This API is used to initialize uploading large files
# Environment
# Test
https://oversea.saicmaxus.com/australia/test/fir/large_file/initialization (opens new window)
# Prod
https://oversea.saicmaxus.com/australia/fir/file/large_file/initialization (opens new window)
# Method
POST
# Request
# Authorization
Set 'maxus_jwt' in header,see in Get Maxus JWT Token
# Payload
| Parameter | Type | Required | Description | 中文描述 |
|---|---|---|---|---|
| remoteKey | String | Yes | File name, with a suffix | 文件名称 |
# Example
curl --request POST \
--url https://oversea.saicmaxus.com/australia/test/fir/large_file/initialization \
--header 'content-type: application/json' \
--header 'maxus_jwt: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhc2NDb2RlIjoiNDE5ODEzMCIsImFzY0lkIjo0MTk4MTMwLCJhc2NOYW1lIjoiQVRFQ08iLCJleHBpcmVUaW1lU3RhbXAiOiIxNzEwMTI2Mzc4NDI4Iiwic2FwQWNjb3VudCI6IjQxOTgxMzAiLCJzZXJ2aWNlQ29kZSI6IkF0ZWNvIiwiaWF0IjoxNzEwMTI2MTk4LCJleHAiOjE3MTAxMjc2Mzh9.-SUpP3Qlf1BygEMQtxtCILFBPGKlsoNwyfUecoeLjjo' \
--data '{
"remoteKey": "1.mp4"
}'
# Response
# Payload
| Parameter | Type | Description |
|---|---|---|
| status | int | 1: Success, 0: Failure |
| errMsg | String | Error message |
| data | String | Upload ID |
# Response Code (errCode)
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 500 | Unknown Error |
| 503 | Dependency System Unavailable |
# Example
# OK
{
"status": 1,
"errMsg": "SUCCESS",
"errCode": "200",
"data": "2~e0oRomCkLDF6WwQnzloDxO9Ul04MTGL"
}
# NOT FOUND
{
"status": 0,
"errMsg": "NOT FOUND",
"errCode": "404",
"data": null
}
# INTERNAL ERROR
{
"status": 0,
"errMsg": "DEPENDENCY SYSTEM UNAVAILABLE",
"errCode": "503",
"data": null
}
{
"status": 0,
"errMsg": "UNKNOWN ERROR",
"errCode": "500",
"data": null
}
# GATEWAY ERROR
http status code: 500
# Unit Test
TODO