- Upload the file with
uploadFile()to get aFileRef. - Pass the
FileRefintosendCommand()as a regular parameter.
Uploading a file
CalluploadFile() with a File or Blob. It returns a FileRef you can pass into sendCommand(), alongside regular arguments.
The example below uses Helios’s set_image command. The commands and file parameters a model accepts vary by model, so check your model’s reference for what it expects.
uploadFile() can only be called when the connection status is "ready". Upload URLs expire
after 15 minutes. For more information, see Rate Limits.The FileRef type
uploadFile() returns a FileRef with metadata about the uploaded file. You never construct one
directly.