The server sample is based on this repository
# in project root
cd server
npm i
node ./server.js
It starts a server at localhost:3000
and accepts file upload through /upload
POST request. Uploaded files will be stored in server/uploads
folder.
This sample was created by initializing a blank React Native project
react-native init TestUploader
To run the demo:
# in project root
npm i
cd ios
pod install
cd ..
npm run ios
- First click on
DOWNLOAD IMG
andDOWNLOAD BIN
to save an image and a binary file to app storage - Then try clicking on
UPLOAD IMG
orUPLOAD BIN
and observe the server console - Notice how the image file has been changed when upload, but not the binary file