picture-dimensionjs
本模块用于在前端识别图片文件类型以及获取文件dimension信息.
Install
# npmnpm install picture-dimensionjs # yarn yarn add picture-dimensionjs
Use
// In React;; const Upload = { return <input type="file" onChange= { const files = ecurrentTarget if files && fileslength > 0 } >}
example
Developer
- clone project and install dependence
# clone project git clone https://github.com/lvyue/picture-dimension.git <your_project># cd <your_project># install dependence npm install
- build lib and start serve
# build package npm build# start serve npm serve
- open http://localhost:3002/example in browser