# react-native-file-transfer-android-plus

> multipart/form-data file upload for react-native android

Latest version **0.0.3** (published 2016-06-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-file-transfer-android-plus
pnpm add react-native-file-transfer-android-plus
yarn add react-native-file-transfer-android-plus
bun add react-native-file-transfer-android-plus
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2016-06-30 |
| First published | 2016-06-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ds.3783 |
| Maintainers | ds3783 |
| Keywords | react-native, android, react-component, multipart, image, upload, image-upload |

## Links

- npm: https://www.npmjs.com/package/react-native-file-transfer-android-plus
- Repository: https://github.com/ds3783/react-native-file-transfer-android-plus
- Homepage: https://github.com/ds3783/react-native-file-transfer-android-plus#readme
- Issues: https://github.com/ds3783/react-native-file-transfer-android-plus/issues
- npm.io page: https://npm.io/package/react-native-file-transfer-android-plus

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2016-06-30
- 0.0.2 — 2016-06-30

## README

#react-native-image-upload-android-plus

Upload images or files through a multipart/form-data request

This is an upgrade version of react-native-image-upload-android with 'data' parameter implementation.

###Installation

```
npm install react-native-file-transfer-android
```

Add to your settings.gradle:
```
include ':RNFileTransfer', ':app'
project(':RNFileTransfer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-file-transfer-android/android')
```

Add to your android/build.gradle:
```
dependencies {
  ...
  compile project(':RNFileTransfer')
}
```

Add to MainActivity.java
```
import com.burlap.filetransfer.FileTransferPackage;
...
mReactInstanceManager = ReactInstanceManager.builder()
        .setApplication(getApplication())
        .setBundleAssetName("index.android.bundle")
        .setJSMainModuleName("index.android")
        .addPackage(new MainReactPackage())
        .addPackage(new FileTransferPackage())
```

###Usage:

```javascript
var FileTransfer = require('react-native-file-transfer-android');
FileTransfer.upload({
  uri: uri,
  uploadUrl: 'http://example.com/upload',
  fileName: 'temp.jpg',
  mimeType: 'image/jpg',
  headers: {
    'Accept': 'application/json'
  },
  data: {
    
  }
}, (err, res) => {
  if(err) {
    console.error(err);
  } else {
    console.log(res);
  }
});
```

#### Options
* uri - uri of the file in the android filesystem
* uploadUrl - endpoint to upload the file to (uses POST)
* fileName - name of the file
* mimeType - file type
* headers - map of headers
* data - any extra data you want sent to the server

---
_Source: https://npm.io/package/react-native-file-transfer-android-plus · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
