Coder Social home page Coder Social logo

eapostol / react-native-redux-photo-upload Goto Github PK

View Code? Open in Web Editor NEW

This project forked from s-d-le/react-native-redux-photo-upload

0.0 1.0 0.0 3.17 MB

React native photo upload with FormData and Redux-Axios

License: MIT License

JavaScript 100.00%

react-native-redux-photo-upload's Introduction

react-native-redux-photo-upload

Credit to omarkhaled11 for providing his original react-native-photo-upload package. I wanted to make a few improvements to this package and make it a little more production ready.

  • Actually uploads images to a server
  • FormData: faster, more efficient than base64
  • Fetch thumbnails instead of fullsized images on app startup for speed
  • Reducks

Why Redux?

  • Sharing axios calls between views
  • One place global storage (for image URI, source...)
  • Auto generated dispatch actions by axios middleware (_SUCCESS, _FAIL)
  • Easy logging, tracing actions, etc...

Quickinstallation

git clone
npm install
react-native link react-native-image-picker
react-native link react-native-image-resizer
react-native link react-native-fs

For Android and iOS specific setup please refer to this document

Test Server Open new terminal, cd somewhere you feel safe.

npm install -g upload-server
mkdir http
http-server start -f http

Copy and paste the server URL into Server.js at export const server = 'yourlocalhost'

You can now react-native run-ios

TODO

  • Improve component life cycle to display the correct position of image on update
  • Loading animation using fetch
  • Open original image in fullscreen
  • Delete images
  • Better error handling (alerting users what actually happens)
  • Store images on local for faster app startup

react-native-redux-photo-upload's People

Contributors

s-d-le avatar

Watchers

Edward J. Apostol avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.