Skip to main content
POST
/
open
/
api
/
phone
/
minio
/
init
/
task
Initialize upload task
curl --request POST \
  --url https://user.pmock.com/api/open/api/phone/minio/init/task \
  --header 'Content-Type: application/json' \
  --data '
{
  "identifier": "<string>",
  "totalSize": 2684354560,
  "chunkSize": 173015040,
  "fileName": "<string>",
  "uploadType": 123,
  "phoneId": 123
}
'
{
  "traceId": "",
  "code": 0,
  "msg": "",
  "data": {
    "finished": false,
    "path": "",
    "taskRecord": {
      "teamId": 0,
      "uploadId": "",
      "fileIdentifier": "",
      "fileName": "",
      "bucketName": "",
      "objectKey": "",
      "totalSize": 0,
      "chunkSize": 0,
      "chunkNum": 0,
      "expireTime": "",
      "exitPartList": [
        {
          "partNumber": 0,
          "lastModified": "",
          "eTag": "",
          "size": 0
        }
      ]
    }
  },
  "status": ""
}

Body

application/json
identifier
string
required

File unique identifier (MD5)

totalSize
integer
required

File size,The total file size is supported, with a maximum of 5GB for file upload

Required range: 1 <= x <= 5368709120
chunkSize
integer
required

Chunk size,Calculate the number of Chunks uploaded based on totalSize and chunkSize(min 30MB, max 300MB)

Required range: 31457280 <= x <= 314572800
fileName
string
required

File name,The file name of the uploaded file (max 60 characters)

Maximum string length: 60
uploadType
integer
required

Upload type: 1=Ordinary file upload,2=APP upload, 3=Advanced file import

phoneId
integer<int64>
required

Phone ID,obtain through Get phone list api

Response

200 - application/json
traceId
string
required

Request link ID

code
integer
required

code

msg
string
required

Request return message

status
string
default:finish
required

Status, representing whether this is an instant completion or waiting state, finish or pending

data
object

Request return data