Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kuckboy1994/node-upload
https://github.com/kuckboy1994/node-upload
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kuckboy1994/node-upload
- Owner: kuckboy1994
- Created: 2020-05-19T17:40:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-26T18:35:32.000Z (over 2 years ago)
- Last Synced: 2024-09-23T17:47:34.519Z (about 2 months ago)
- Language: JavaScript
- Size: 286 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
node-upload模拟浏览器上传(Simulate browser upload)
## Install
```bash
yarn add @kuckboy/node-upload
```## Basic Usage
```js
import nodeUpload from "@kuckboy/node-upload";const { host, accessid, signature, policy, dir, fileName } = await api();
nodeUpload({
url: host, //url
file: fileName, //文件位置
param: "file", //文件上传字段名
field: {
name: fileName,
OSSAccessKeyId: accessid,
Signature: signature,
policy: policy,
key: `${dir}/${fileName}`,
success_action_status: "200",
},
});
```