Skip to content

Request Temporary Upload URL

Request

Request a pre-signed URL for uploading a file that a Cloud Phone will receive.

  • Preconditions: the phone must be powered on and not held by another member.
  • Completion: synchronous. The pre-signed URL is valid for one hour. PUT the file content to it, then register the upload with /api/cloudphone/upload/file.
  • Note: temporary objects are removed automatically after 7 days.
  • Surface note: this is the same implementation as /cloudphone/uploadUrl on the Open API.
Bodyapplication/jsonrequired
idstringrequired

Cloud phone ID

fileNamestringrequired

File name

curl -i -X POST \
  http://127.0.0.1:40000/api/cloudphone/upload/file/signedUrl \
  -H 'Content-Type: application/json' \
  -d '{
    "fileName": "icon.png",
    "id": "1666625111121936"
  }'

Responses

Success. data is an object with the fields presignedUrl.

Headers
any
Bodyapplication/json
codeintegerrequired
msgstring or nullrequired
dataobjectrequired
requestIdstringrequired
Response
{ "code": 0, "msg": null, "data": { "presignedUrl": "https://example-bucket.s3.amazonaws.com/prod/cloudPhoneOpenApi/1666625111121936/20260901/demo.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&X-Amz-Signature=EXAMPLE" }, "requestId": "d0b850e2c3d54279b524e9540a358e0a" }