mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-09-07 00:17:03 +08:00
Fixed: qiniu uploader path undefined
This commit is contained in:
@@ -6,7 +6,7 @@ import { Notification } from 'electron'
|
|||||||
|
|
||||||
function postOptions (fileName, token, imgBase64) {
|
function postOptions (fileName, token, imgBase64) {
|
||||||
const area = selectArea(db.read().get('picBed.qiniu.area').value() || 'z0')
|
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, '_')
|
const base64FileName = Buffer.from(path + fileName, 'utf-8').toString('base64').replace(/\+/g, '-').replace(/\//g, '_')
|
||||||
return {
|
return {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|||||||
Reference in New Issue
Block a user