@jswork/next-weibo-oss
v1.1.3
Published
Weibo oss for next api.
Downloads
33
Readme
next-weibo-oss
Weibo oss for next api.
installation
npm install -S @jswork/next-weibo-oss
proxy_pass(node)
app.use(
'/weibo_api',
proxy({
target: 'https://picupload.weibo.com',
changeOrigin: true,
pathRewrite: { '^/weibo_api/': '/' }
})
);
proxy_pass(nginx)
location /weibo_api {
proxy_pass https://picupload.weibo.com;
rewrite ^/weibo_api/(.*) /$1 break;
}
apis
| api | params | description | | ------- | -------- | -------------- | | upload | file | Upload a file. | | uploads | fileList | Upload files. |
usage
import '@jswork/next-weibo-oss';
const weiboOss = new nx.WeiboOss(token);
// single file:
weiboOss.upload(file);
// multiple files:
weiboOss.uploads(files);
license
Code released under the MIT license.