1.0.8 • Published 5 years ago

@zhike/axios-upload v1.0.8

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

axios-upload

node 中在 axios 基础上上传表单数据

npm npm

GitHub forks GitHub stars

Installation

npm i @zhike/axios-upload 

example

const axiosUpload = require('axios-upload');

// 这里直接将 stream 传入即可
// 文件默认上传最大为100M,若需修改,使用maxContentLength参数,单位byte
const data = {
  name: 'test',
  filedata: fs.createReadStream('./test.png')
};

await axiosUpload({
  url: 'http://xxx.xxx/test',
  method: 'post',
  headers: {
    'cache-control': 'no-cache'
  },
  data: data
});
1.0.8

5 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago