/** * Created by PengLing on 2017/12/26. */ 'use strict'; function createConfig(opts = {}) { let config = { uploadPath: opts.uploadPath || 'other', // 'other' equivalent to '/other' maxSize: 10485760 // 10M }; if (opts.qiniu) { config.qiniu = { accessKey: 'YwL-KPPPrPFqm5VfCDLSSePi6pa0c0rxbTDGVUSQ', secretKey: 'dFHk_EfTk6ufIaG56h4gzcL3IrAtwl2RkJcl8XuO', bucket: 'savoir-test', domain: 'http://p1wqkojj4.bkt.clouddn.com' }; } else { config.local = { origin: opts.origin, rootPath: opts.rootPath, childPath: opts.childPath }; } return config; } module.exports = createConfig;