Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afeiship/next-weibo-oss
Weibo oss for next api.
https://github.com/afeiship/next-weibo-oss
next oss upload weibo
Last synced: 2 months ago
JSON representation
Weibo oss for next api.
- Host: GitHub
- URL: https://github.com/afeiship/next-weibo-oss
- Owner: afeiship
- License: mit
- Created: 2018-09-10T09:23:51.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-15T12:58:53.000Z (5 months ago)
- Last Synced: 2024-10-06T22:22:47.294Z (3 months ago)
- Topics: next, oss, upload, weibo
- Language: JavaScript
- Size: 37.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-weibo-oss
> Weibo oss for next api.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```bash
npm install -S @jswork/next-weibo-oss
```## proxy_pass(node)
```js
app.use(
'/weibo_api',
proxy({
target: 'https://picupload.weibo.com',
changeOrigin: true,
pathRewrite: { '^/weibo_api/': '/' }
})
);
```## proxy_pass(nginx)
```js
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
```js
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](https://github.com/afeiship/next-weibo-oss/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/next-weibo-oss
[version-url]: https://npmjs.org/package/@jswork/next-weibo-oss[license-image]: https://img.shields.io/npm/l/@jswork/next-weibo-oss
[license-url]: https://github.com/afeiship/next-weibo-oss/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-weibo-oss
[size-url]: https://github.com/afeiship/next-weibo-oss/blob/master/dist/next-weibo-oss.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/next-weibo-oss
[download-url]: https://www.npmjs.com/package/@jswork/next-weibo-oss