Upload Editor Media
upload_editor_mediaPut an image, video or audio file into your real Switch Editor project (its media and the end of its timeline). Three ways: url (an https link to the file; Switch keeps a copy), video_id (one of your finished videos from list_my_videos, attached as it is), or bytes (call with presign=true, PUT the bytes to upload_url, then call again with confirm_path). A video gets its scrub copy made right away so the project opens ready.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | An https link to the file to bring in (no presign needed). | |
| kind | No | What the file is. | |
| mime | No | The file type, for example video/mp4. | |
| presign | No | true on the first call: answers an upload_url to PUT the bytes to and the path to confirm. | |
| filename | No | The file name with its extension. | |
| video_id | No | One of your finished videos (list_my_videos) to attach as it is. | |
| file_size | No | Bytes; required for presign. | |
| project_id | Yes | The Editor project id, from list_editor_projects. | |
| confirm_path | No | The path from the presign answer, on the second call after the PUT, to place the file in the project. | |
| duration_seconds | No | The clip length in seconds, if known. A still image with none given is placed as a 5-second clip. |