React XHR Uploader
React component for uploading files with XMLHTTPRequest v2
Check full documentation with examples at https://rma-consulting.github.io/react-xhr-uploader
Pull requests are welcome.
How to run/develop locally
Use npm start
to run the webpack development server at localhost:8080. Hot module replacement is enabled.
Use npm test
to run the tests. Use npm test:tdd
to run the tests continuously in watch mode.
Use npm run test:lint
to run ESLint checks.
Example express server
You will need a server that would accept post requests for multipart file uploads. Below is a sample express server to test out the examples.
const express = ;const Busboy = ;const fs = ; const port = 3000;const app = ; appall'/api/uploadfile' { res; res; ; }; app; app;