Skip to content

mgscreativa/React-Native-Upload-Files-to-Meteor-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native Upload Files to Meteor Server

Sample app to demostrate upload files from React Native app to Meteor Server, with DropBox integration. This demo uses expo, to install it just run npm install expo-cli --global, it's a free and open source toolchain built around React Native to help you build native iOS and Android projects using JavaScript and React, see details here.

Run Meteor Server

  • Download/checkout this repo
  • cd meteor-server
  • Edit settings-development.json, complete DROPBOX_TOKEN property. Instructions here Prepare: Get access to DropBox API:. Take a look at allowedUploadFormats to check allowed upload files, by default png|jpg|jpeg|gif|mp4|mov|qt|pdf|ods
  • Run ~/meteor --settings settings-development.json --port 3000
  • Visit http://localhost:3000 and login with [email protected] and password
  • Click on Files menu to see current uploaded files

Run React Native App

  • Download Expo app to your mobile device iOS - Android
  • cd react-native-app
  • Run ~/expo start
  • Run app from expo then select media from camera roll, take a picture or pick a file (pdf or ods, or image)
  • Upload the file through:
    • Meteor Method (Uses DDP and base64, very unefficient. Currently supports only image files. Can't upload large files, like videos. Document files [ods, pdf] get corrupted, I think because of base64).
    • POST request (Upload anything allowed and it works!)
    • Apisause POST (the same as above but using the Apisause npm library)

Based on

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published