Fixed: qiniu uploader path undefined

This commit is contained in:
Molunerfinn 2018-03-12 11:01:14 +08:00
parent 458087a94e
commit fb236c3186

View File

@ -6,7 +6,7 @@ import { Notification } from 'electron'
function postOptions (fileName, token, imgBase64) {
const area = selectArea(db.read().get('picBed.qiniu.area').value() || 'z0')
const path = db.read().get('picBed.qiniu.path') || ''
const path = db.read().get('picBed.qiniu.path').value() || ''
const base64FileName = Buffer.from(path + fileName, 'utf-8').toString('base64').replace(/\+/g, '-').replace(/\//g, '_')
return {
method: 'POST',