https://github.com/dxcweb/fs-upload
截图后粘贴、拖拽和点击上传预览,图片压缩。
https://github.com/dxcweb/fs-upload
Last synced: 9 months ago
JSON representation
截图后粘贴、拖拽和点击上传预览,图片压缩。
- Host: GitHub
- URL: https://github.com/dxcweb/fs-upload
- Owner: dxcweb
- Created: 2017-03-31T05:38:54.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-28T05:54:39.000Z (over 8 years ago)
- Last Synced: 2025-05-07T21:07:16.492Z (about 1 year ago)
- Language: JavaScript
- Size: 414 KB
- Stars: 10
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fs-upload
截图后粘贴、拖拽和点击上传预览,图片压缩。
## install
```
npm install fs-upload --save
```
## Development
```
npm install
npm start
```
## Example
[http://github.dxcweb.com/fs-upload/](http://github.dxcweb.com/fs-upload/ "http://github.dxcweb.com/fs-upload/")
## API
Name
Type
Default
Description
paste
Bool
true
是否支持粘贴
drop
Bool
true
是否支持拖拽
domain
String
document
域 document或者self 指drop或paste在什么域上
allow
String
image
允许上传文件格式 比如:image或者image|zip
onError
Function
null
类型错误时调用参数(msg, type)
onChange
Function
null
输入参数files