# Tải lên tệp cho URL

Đăng ký một tệp đã tải lên để cloud phone tải nó xuống.
- **Điều kiện tiên quyết**: cloud phone phải đang bật và không bị thành viên khác chiếm giữ, và **đối tượng phải đã tồn tại tại URL đó**. Tệp tải lên cho phát trực tiếp phải là MP4 và nhắm tới một dịch vụ thiết bị có hỗ trợ phát trực tiếp.
- **Hoàn tất**: **đã tiếp nhận, chưa hoàn tất.** Phản hồi trả về `fileId` với trạng thái đang xử lý; hãy hỏi vòng `/api/cloudphone/upload/file/result`.
- **Lưu ý về bề mặt API**: đây là cùng một hiện thực với `/cloudphone/uploadFile` trên Open API. Đừng lẫn nó với luồng multipart cũ hơn `/api/cloudphone/uploadFile` trên chính bề mặt này.

Các mã lỗi nghiệp vụ đã ghi nhận: `33401`, `33419`. Xem [Error Codes](../Getting%20Started/error-codes.md) để biết ý nghĩa từng mã. Mọi thao tác cũng có thể trả về các mã dùng chung.

Endpoint: POST /api/cloudphone/upload/file
Version: 2026-09-05

## Request fields (application/json):

  - `id` (string, required)
    Cloud phone ID

  - `url` (string, required)
    Upload url, which can be the link returned by the cloudphone/upload/file/signedURL interface or other publicly accessible file download address

  - `uploadDest` (string, required)
    Storage directory

  - `uploadType` (integer)
    File type (1 = regular file, 2 = MP4 live-streaming file)
    Enum: "1", "2"

## Response 200:

  - `200` (unknown)
    Success. `data` is an object with the fields `id`, `fileId` and `status`.

## Response 200 fields (application/json):

  - `code` (integer, required)
    Response code, 0 indicates success,>0 indicates failure

  - `msg` (string | null, required)

  - `data` (object, required)

  - `data.id` (string, required)
    Cloud phone id

  - `data.fileId` (string, required)
    Upload file id

  - `data.status` (integer, required)
    Upload status;0:uploading in progress, 1:upload successful, 2:upload failed

  - `requestId` (string, required)

