Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kuckboy1994/node-upload


https://github.com/kuckboy1994/node-upload

Last synced: 14 days ago
JSON representation

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",
},
});
```