qn
qn copied to clipboard
怎么和express配合上传啊
初始化
var qn = require('qn');
var client = qn.create({
accessKey: 'your access key',
secretKey: 'your secret key',
bucket: 'your bucket name',
domain: 'http://{bucket}.u.qiniudn.com',
// timeout: 3600000, // default rpc timeout: one hour, optional
// if your app outside of China, please set `uploadURL` to `http://up.qiniug.com/`
// uploadURL: 'http://up.qiniu.com/',
});
下面对吗
exports.upload = function(req, res ){
client.upload(req, function(err, result){
...
});
}