Upload resource file

1. API Description

This API is used to upload resource files to the device. Supported file types include pictures, videos, PDFs, and music. The uploaded files must be imported into the media files via Import resource before they can be used.

Request mode:

  • V2.6.0 and above: POST [ip]/mwapi/V2.0/scene/upload-source-file
  • V2.5.0 and below: POST [ip]/mwapi/upload-source-file
Administrator Rights Logged-in
No Yes

2. Input Parameters

Binary encapsulated attachment data.

3. Output Parameters

Name Type Description
status Int Status code

4. Example

Uploading an audio file.

Input Example
------WebKitFormBoundaryIQYfOLWb1KdjY6f3
Content-Disposition: form-data; name="file"; filename="demo.mp4"
Content-Type: application/octet-stream


------WebKitFormBoundaryIQYfOLWb1KdjY6f3--
Output Example
{
  "status": 0,
}

5. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Status Definition Description
11 MW_STATUS_DEVICE_BUSY Device is busy (Presentation is being imported/exported, recording is in progress, etc.)

results matching ""

    No results matching ""