diff --git a/src/main/utils/qiniuUpload.js b/src/main/utils/qiniuUpload.js index 5df4a365..afa4f9fa 100644 --- a/src/main/utils/qiniuUpload.js +++ b/src/main/utils/qiniuUpload.js @@ -6,7 +6,8 @@ import { Notification } from 'electron' function postOptions (fileName, token, imgBase64) { const area = selectArea(db.read().get('picBed.qiniu.area').value() || 'z0') - const base64FileName = Buffer.from(fileName, 'utf-8').toString('base64').replace(/\+/g, '-').replace(/\//g, '_') + const path = db.read().get('picBed.qiniu.path') || '' + const base64FileName = Buffer.from(path + fileName, 'utf-8').toString('base64').replace(/\+/g, '-').replace(/\//g, '_') return { method: 'POST', url: `http://upload${area}.qiniu.com/putb64/-1/key/${base64FileName}`, diff --git a/src/renderer/components/SettingView/Qiniu.vue b/src/renderer/components/SettingView/Qiniu.vue index 94707b63..464be8e3 100644 --- a/src/renderer/components/SettingView/Qiniu.vue +++ b/src/renderer/components/SettingView/Qiniu.vue @@ -58,6 +58,11 @@ > + + + 确定 @@ -82,7 +87,8 @@ export default { bucket: '', url: '', area: 'z0', - options: '' + options: '', + path: '' } } }, @@ -127,6 +133,8 @@ export default { color #eee .el-input__inner border-radius 19px + &-item + margin-bottom 10.5px .el-radio-group width 100% label diff --git a/src/renderer/components/SettingView/Upload.vue b/src/renderer/components/SettingView/Upload.vue index c048e8c3..562491b4 100644 --- a/src/renderer/components/SettingView/Upload.vue +++ b/src/renderer/components/SettingView/Upload.vue @@ -166,6 +166,8 @@ export default { margin-top 20px opacity 0 transition all .2s ease-in-out + width 450px + margin-left 25px &.show opacity 1 .el-progress-bar__inner