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

## fetchDeviceFileUploadState

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

### Description

Get upload status

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `uploadToken` | `string` | Yes | Key for querying the storage result |

### Return Value

Type: `Promise<UploadState>`

UploadState: bizUrl (long-term cloud storage URL), pollingToken (polling key for large-file storage results)

##### UploadState

| Property | Type | Description |
| --- | --- | --- |
| `bizUrl` | `string` | Long-term cloud storage access URL (returned after the upload completes and is ready) |
| `pollingToken` | `string` | Token used to poll results for large files; pass to `fetchBigPublicFileUploadState` |

### Examples

#### Request example

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

fetchDeviceFileUploadState('upload-token-from-sign')
  .then((state) => {
    console.log(state);
  })
  .catch();
```

#### Response example

```json
{
  "bizUrl": "https://example.com/cloud/clip.wav",
  "pollingToken": ""
}
```
