/upload-download-nodejs

A file upload and download module for Node.js(文件上传与下载Node.js版)

Primary LanguageJavaScriptMIT LicenseMIT

upload-download-nodejs

GitHub Workflow Status GitHub package.json dynamic GitHub package.json dependency version (prod) GitHub package.json dependency version (prod) GitHub package.json dependency version (prod) GitHub package.json dependency version (prod) license

English简体中文

A file upload and download module for nodejs.

It is out of business and returns a collection of file paths that you can decide how to use and where to use。

Usage

  • Upload

POST /appendix/test
Content-Type: multipart/form-data; boundary=WebAppBoundary

--WebAppBoundary
# File upload
Content-Disposition: form-data; name="file"; filename="demo.tar.gz"
Content-Type: application/x-gzip

# Here you specify file to upload
< ../../tar/demo.tar.gz
--WebAppBoundary--

# return a collection of file paths
["\\appendix\\test\\daad5d07-2be6-44fa-978c-1581931a63a2\\demo.tar.gz"] (Windows)
["/appendix/test/daad5d07-2be6-44fa-978c-1581931a63a2/demo.tar.gz"] (Linux/MAC OS)
  • Download

GET /appendix/test/daad5d07-2be6-44fa-978c-1581931a63a2/demo.tar.gz

Related Efforts

Maintainers

@myifeng.

Contributing

Feel free to dive in! Open an issue or submit PRs.

Standard Readme follows the Contributor Covenant Code of Conduct.

License

MIT © myifeng