{"id":4720,"url":"https://github.com/booxood/react-native-file-upload","last_synced_at":"2026-03-16T12:32:45.393Z","repository":{"id":32698468,"uuid":"36287839","full_name":"booxood/react-native-file-upload","owner":"booxood","description":"A plugin for file upload on react-native","archived":false,"fork":false,"pushed_at":"2016-03-22T11:24:44.000Z","size":8,"stargazers_count":113,"open_issues_count":5,"forks_count":19,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-27T21:50:16.268Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/booxood.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-26T10:08:10.000Z","updated_at":"2024-05-06T09:12:19.000Z","dependencies_parsed_at":"2022-09-11T16:21:26.597Z","dependency_job_id":null,"html_url":"https://github.com/booxood/react-native-file-upload","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/booxood%2Freact-native-file-upload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/booxood%2Freact-native-file-upload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/booxood%2Freact-native-file-upload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/booxood%2Freact-native-file-upload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/booxood","download_url":"https://codeload.github.com/booxood/react-native-file-upload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243858286,"owners_count":20359253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:17:21.270Z","updated_at":"2026-03-16T12:32:45.357Z","avatar_url":"https://github.com/booxood.png","language":"Objective-C","funding_links":[],"categories":["Components"],"sub_categories":["Backend"],"readme":"# react-native-file-upload  [![NPM version](https://img.shields.io/npm/v/react-native-file-upload.svg?style=flat-square)](https://www.npmjs.com/package/react-native-file-upload)\n\n\u003e React Native latest version had support file upload, the package is **deprecated**, detail see [#4](/../../issues/4) [#7](/../../issues/7).\n\nA file upload plugin for react-native written by Objective-C.\n\n* Support to upload multiple files at a time\n* Support to files and fields\n\n## Getting started\n\n1. `npm install react-native-file-upload --save`\n2. In XCode, in the project navigator, right click `your project` ➜ `Add Files to [your project's name]`\n3. Go to `node_modules` ➜ `react-native-file-upload` and add `FileUpload.m`\n4. Run your project (`Cmd+R`)\n\n## Usage\n\nAll you need is to export module `var FileUpload = require('NativeModules').FileUpload;` and direct invoke `FileUpload.upload`.\n\n```javascript\n'use strict';\n\nvar React = require('react-native');\nvar FileUpload = require('NativeModules').FileUpload;\n\nvar {\n  AppRegistry,\n  StyleSheet,\n  Text,\n  View,\n} = React;\n\nvar FileUploadDemo = React.createClass({\n  componentDidMount: function() {\n    var obj = {\n        uploadUrl: 'http://127.0.0.1:3000',\n        method: 'POST', // default 'POST',support 'POST' and 'PUT'\n        headers: {\n          'Accept': 'application/json',\n        },\n        fields: {\n            'hello': 'world',\n        },\n        files: [\n          {\n            name: 'one', // optional, if none then `filename` is used instead\n            filename: 'one.w4a', // require, file name\n            filepath: '/xxx/one.w4a', // require, file absoluete path\n            filetype: 'audio/x-m4a', // options, if none, will get mimetype from `filepath` extension\n          },\n        ]\n    };\n    FileUpload.upload(obj, function(err, result) {\n      console.log('upload:', err, result);\n    })\n  },\n  render: function() {\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cText style={styles.welcome}\u003e\n          Welcome to React Native!\n        \u003c/Text\u003e\n      \u003c/View\u003e\n    );\n  }\n});\n\nvar styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    backgroundColor: '#F5FCFF',\n  },\n  welcome: {\n    fontSize: 20,\n    textAlign: 'center',\n    margin: 10,\n  },\n});\n\nAppRegistry.registerComponent('FileUploadDemo', () =\u003e FileUploadDemo);\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbooxood%2Freact-native-file-upload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbooxood%2Freact-native-file-upload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbooxood%2Freact-native-file-upload/lists"}