---
name: "postBLEFileTransfer"
mode: "kit"
versionRequirements:
  - { name: "DeviceKit", version: "3.0.0" }
platform:
  - "iOS"
  - "Android"
async: true
---

## postBLEFileTransfer

> [VERSION] DeviceKit >= 3.0.0

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

Transfer file to a Bluetooth device

### Parameters

| Property | Type | Required | Default | Since | Description |
| --- | --- | --- | --- | --- | --- |
| `deviceId` | `string` | Yes | - | `3.0.0` | Device model, Device ID |
| `fileId` | `number` | Yes | - | `3.0.0` | File ID |
| `fileIdentifier` | `string` | Yes | - | `3.0.0` | File identifier |
| `fileVersion` | `number` | Yes | - | `3.0.0` | File version |
| `filePath` | `string` | Yes | - | `3.0.0` | File URL |
| `complete` | `() => void` | No | - | - | Callback when the API call completes (runs on success or failure) |
| `success` | `(params: Object) => void` ↓see below | No | - | - | Callback when the API call succeeds |
| `fail` | `(params: Object) => void` ↓see below | No | - | - | Callback when the API call fails |

#### success callback parameters

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `result` | `boolean` | `3.3.0` | true/false: transfer succeeded/failed |

#### fail callback parameters

| Property | Type | Description |
| --- | --- | --- |
| `errorMsg` | `string` | Error message |
| `errorCode` | `string \| number` | Error code |
| `innerError` | `Object` | Error extension |

##### fail(params).innerError properties

| Property | Type | Description |
| --- | --- | --- |
| `errorCode` | `string \| number` | Extended error code |
| `errorMsg` | `string` | Extended error info |
