Closed GuoliangWang closed 6 years ago
function updateConfigWithOptions(options) { if (options.region) { config.qiniuRegion = options.region; } else { console.error('qiniu uploader need your bucket region'); **//可以改成 // if (config.qiniuRegion == '' || config.qiniuRegion == null) { // console.error('qiniu uploader need your bucket region'); // }** } if (options.uptoken) { config.qiniuUploadToken = options.uptoken; } else if (options.uptokenURL) { config.qiniuUploadTokenURL = options.uptokenURL; } else if(options.uptokenFunc) { config.qiniuUploadTokenFunction = options.uptokenFunc; } if (options.domain) { config.qiniuImageURLPrefix = options.domain; } config.qiniuShouldUseQiniuFileName = options.shouldUseQiniuFileName; }
多谢多谢。有兴趣的话,不妨一起来维护这个项目呀
btw这个地方我还是打算使用 null 来直接判断就好,空字符串严格意义上来说,并不是空,而是一个无效的输入,而值的有效性判断,会在上传的时候利用 uploadURLFromRegionCode 方法一并检查
uploadURLFromRegionCode