Skip to content

nqphuong/react-dropzone-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-dropzone-sample

The short code demonstrates how to upload files with react and dropzonejs library.

This demonstration is a duplicate example of React-Dropzone-Component. Thank you so much. If you want to read full explication, please visit here.

I decided to push this code because the origin example was not clear and not easy to apply with some confused configuration. I organized the structure, added two possibility to upload resource files (with Express or PHP) and also changed the uploading template.

###Installation npm install

###Run Build bundle.js

webpack

Run server

npm start

Test

http://localhost:3000

##Change destination storage By default, I used PHP process to upload file to external storage (see upload.php).

If you want to use Express files uploading, please follow the instructions below:

###Using express

Uncomment: require('../multerImpl')(app) in server.js

Uncomment: postUrl: '/uploadHandler' in index.js

Comment action attribute in render function.

Rebuild bundle.js

About

The short code demonstrates how to upload files with react and dropzonejs library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published