fileRelationSave(fileInfo: FileInfo, devId: string)

版本要求:
@tuya-miniapp/cloud-api≥1.0.5

描述

保存宠物媒体文件

参数

参数类型必填说明
是文件信息:objectKey、fileName
devIdstring是设备 id

返回值

类型:Promise<boolean>
boolean

示例代码

请求示例

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();

返回示例

true