Skip to content

使用 qiniu 上传文件的模块,依赖jQuery

Notifications You must be signed in to change notification settings

riskers/qiniu_upload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

qiniu_upload

一个使用 qiniu 上传文件的模块,依赖jQuery

使用

var qiniuUpload = require('qiniu_upload')
var $ = require('jquery')
var url = 'token_url'

$('.btn').change(function(){
    var file = $(this).get(0).files[0]
    
    qiniuUpload(file,url).then(function(url){
        //...
    })
    
})

返回 Promise 对象

参数

  • file: 文件
  • url: 获取 token 的接口

安装

npm install qiniu_upload

About

使用 qiniu 上传文件的模块,依赖jQuery

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published