mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-18 18:17:37 +08:00
Added: qiniu upload custom path
This commit is contained in:
@@ -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}`,
|
||||
|
||||
@@ -58,6 +58,11 @@
|
||||
>
|
||||
<el-input v-model="form.options" @keyup.native.enter="confirm" placeholder="例如?imageslim"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="指定存储路径"
|
||||
>
|
||||
<el-input v-model="form.path" @keyup.native.enter="confirm" placeholder="例如img/"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="confirm" round>确定</el-button>
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user