Skip to content

Commit 6437062

Browse files
xiaomuzhuJacksonTian
authored andcommitted
refactor: topic
1 parent 1fd4b6f commit 6437062

File tree

14 files changed

+1396
-406
lines changed

14 files changed

+1396
-406
lines changed

app/common/upload.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use strict';
2+
3+
const util = require('util');
4+
const qn = require('qn');
5+
6+
exports = function qnUpload(options) {
7+
// 7牛 client
8+
let qnClient;
9+
if (options.qn_access && options.qn_access.secretKey !== 'your secret key') {
10+
qnClient = qn.create(options.qn_access);
11+
}
12+
const qnUpload = util.promisify(qnClient.upload);
13+
return qnUpload;
14+
};

0 commit comments

Comments
 (0)