React picture cropper is a React component for picture cropping and uploading from the front-end.
Example Usage
- 1.Install the package:
npm install react-picture-cropper
- 2.Import the component to your code as a normal React component:
{ return <PicCropper action="path"/> }
action: The path you upload your image
Demo
- 1.Enter the root directory of the module(in node_modules)
- 2.Run the demo
npm run demo1
- 3.Visit http://localhost:8080/index.html in your browser
- 4.Select one pic and upload it the your local server, you'll find the uploaded picture at /demo/upload/ as "fileData.png"