Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/julianduque/micro-upload
An express-fileupload wrapper for micro
https://github.com/julianduque/micro-upload
Last synced: about 1 month ago
JSON representation
An express-fileupload wrapper for micro
- Host: GitHub
- URL: https://github.com/julianduque/micro-upload
- Owner: julianduque
- License: mit
- Created: 2017-04-18T19:17:29.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-08-05T15:15:08.000Z (over 4 years ago)
- Last Synced: 2025-01-07T15:23:08.677Z (about 1 month ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 34
- Watchers: 0
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-micro - micro-upload - A express-fileupload wrapper for Zeit's micro. (Modules / Wrappers)
README
# micro-upload
An [express-fileupload](https://npm.im/express-fileupload) wrapper for [micro](https://github.com/zeit/micro)
## Install
```
$ npm install --save micro-upload
```## Usage
``` js
'use strict'const { send } = require('micro')
const { upload, move } = require('micro-upload')module.exports = upload(async (req, res) => {
if (!req.files) {
return send(res, 400, 'no file uploaded')
}let file = req.files.file
await move(file, `/tmp/uploads/${file.name}`)
send(res, 200, 'upload success')
})
```
## Authors and ContributorsJulián DuqueGitHub/julianduqueTwitter/@julian_duque
Contributions are welcomed from anyone wanting to improve this project!
## License & Copyright
**micro-upload** is Copyright (c) 2017 Julian Duque and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included [LICENSE.md](https://github.com/julianduque/micro-upload/blob/master/LICENSE.md) file for more details.