0.1.0 • Published 6 years ago

uppy-qiniu-uploader v0.1.0

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

uppy-qiniu-uploader

uppy qiniu uploader plugin

install

npm i uppy-qiniu-uploader -S

Getting Started

<div id="select-files"></div>
import "uppy/dist/uppy.css";
import Uppy from "uppy/lib/core";
import Dashboard from "uppy/lib/plugins/Dashboard";
import Qiniu from "uppy-qiniu-uploader";
const uppy = Uppy({
    autoProceed: false
    })
    .use(Dashboard, {
        target: "#select-files",
        inline: true,
        proudlyDisplayPoweredByUppy: false
    })
    .use(Qiniu, {
        host: "http://p7fl7t6sj.bkt.clouddn.com",
        getToken() {
            // return qiniu upload token
        }
    })
    .run();
uppy.on("complete", result => {
        console.log(`Upload complete! We’ve uploaded these files: `, result);
    });

Options

host{(String)}

root URL of link uploaded file

getToken{Function}

the method for get qiniu upload token

useKeyName{Boolean}

use file's hash to be file name save in qiniu cloud

0.1.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago