fileRelationSave(fileInfo: FileInfo, devId: string)

Requires:
@tuya-miniapp/cloud-api≥1.0.5

Description

Save pet media files

Parameters

ParameterTypeRequiredDescription
YesFile info: objectKey, fileName
devIdstringYesDevice ID

Return Value

Type: Promise<boolean>
boolean

Examples

Request example

import { fileRelationSave } from '@tuya-miniapp/cloud-api';

fileRelationSave(
  { objectKey: 'your-object-key', fileName: 'clip.wav' },
  'vdevo167504******003'
)
  .then((res) => {
    console.log(res.token, res.action);
  })
  .catch();

Response example

true