mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-09-07 16:36:57 +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) {
|
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 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 {
|
return {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: `http://upload${area}.qiniu.com/putb64/-1/key/${base64FileName}`,
|
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-input v-model="form.options" @keyup.native.enter="confirm" placeholder="例如?imageslim"></el-input>
|
||||||
</el-form-item>
|
</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-form-item>
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button type="primary" @click="confirm" round>确定</el-button>
|
<el-button type="primary" @click="confirm" round>确定</el-button>
|
||||||
@@ -82,7 +87,8 @@ export default {
|
|||||||
bucket: '',
|
bucket: '',
|
||||||
url: '',
|
url: '',
|
||||||
area: 'z0',
|
area: 'z0',
|
||||||
options: ''
|
options: '',
|
||||||
|
path: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -127,6 +133,8 @@ export default {
|
|||||||
color #eee
|
color #eee
|
||||||
.el-input__inner
|
.el-input__inner
|
||||||
border-radius 19px
|
border-radius 19px
|
||||||
|
&-item
|
||||||
|
margin-bottom 10.5px
|
||||||
.el-radio-group
|
.el-radio-group
|
||||||
width 100%
|
width 100%
|
||||||
label
|
label
|
||||||
|
|||||||
@@ -166,6 +166,8 @@ export default {
|
|||||||
margin-top 20px
|
margin-top 20px
|
||||||
opacity 0
|
opacity 0
|
||||||
transition all .2s ease-in-out
|
transition all .2s ease-in-out
|
||||||
|
width 450px
|
||||||
|
margin-left 25px
|
||||||
&.show
|
&.show
|
||||||
opacity 1
|
opacity 1
|
||||||
.el-progress-bar__inner
|
.el-progress-bar__inner
|
||||||
|
|||||||
Reference in New Issue
Block a user