---
name: "fetchDeviceFileSign"
mode: "kit"
versionRequirements:
  - { name: "@tuya-miniapp/cloud-api", version: "1.0.5" }
---

## fetchDeviceFileSign

> [VERSION] @tuya-miniapp/cloud-api >= 1.0.5

### 描述

获取临时地址上传签名

### 参数

`Params`

| 参数 | 类型 | 必填 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| `bizType` | `string` | 是 | - | 业务类型 |
| `fileName` | `string` | 是 | - | 待存文件名称 |
| `contentType` | `string` | 是 | - | 待存文件分类 |

### 示例代码

#### 请求示例

```typescript
import { fetchDeviceFileSign } from '@tuya-miniapp/cloud-api';

fetchDeviceFileSign('pet_media', 'clip.wav', 'audio/wav')
  .then((sign) => {
    console.log(sign);
  })
  .catch();
```

#### 返回示例

```json
{
  "action": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token": "upload-token-abc123"
}
```
