Skip to content

Upload File via URL

Request

Register an uploaded file so the Cloud Phone downloads it.

  • Preconditions: the phone must be powered on and not held by another member, and the object must already exist at the URL. Live-stream uploads must be MP4 and target a device that supports streaming.
  • Completion: accepted, not complete. The response returns fileId with an in-progress status; poll /api/cloudphone/upload/file/result.
  • Surface note: this is the same implementation as /cloudphone/uploadFile on the Open API. Do not confuse it with the older /api/cloudphone/uploadFile multipart flow on this surface.

Documented business errors: 33401, 33419. See Error Codes for what each code means. Any operation can additionally return the common codes.

Bodyapplication/jsonrequired
idstringrequired

Cloud phone ID

urlstringrequired

Upload url, which can be the link returned by the cloudphone/upload/file/signedURL interface or other publicly accessible file download address

uploadDeststringrequired

Storage directory

uploadTypeinteger

File type (1 = regular file, 2 = MP4 live-streaming file)

Default:1
Enum:12
curl -i -X POST \
  http://127.0.0.1:40000/api/cloudphone/upload/file \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "https://example-bucket.s3.amazonaws.com/prod/cloudPhoneOpenApi/1666625111121936/20260901/demo.mp4",
    "id": "1666625111121936",
    "uploadDest": "/Download",
    "uploadType": 2
  }'

Responses

Success. data is an object with the fields id, fileId and status.

Headers
any
Bodyapplication/json
codeintegerrequired

Response code, 0 indicates success,>0 indicates failure

msgstring or nullrequired
dataobjectrequired
requestIdstringrequired
Response
{ "code": 0, "msg": null, "data": { "id": "1666625111121936", "fileId": "10069435", "status": 0 }, "requestId": "e5d69c5e2d364106a0715dab1d9a03d3" }