|
|
@ -143,7 +143,7 @@
|
|
|
|
allow-multiple='true'
|
|
|
|
allow-multiple='true'
|
|
|
|
:files='files'
|
|
|
|
:files='files'
|
|
|
|
max-files='10'
|
|
|
|
max-files='10'
|
|
|
|
server='/u'
|
|
|
|
:server='filePondServerOpts'
|
|
|
|
:instant-upload='false'
|
|
|
|
:instant-upload='false'
|
|
|
|
:allow-revert='false'
|
|
|
|
:allow-revert='false'
|
|
|
|
@processfile='onFileProcessed'
|
|
|
|
@processfile='onFileProcessed'
|
|
|
@ -230,6 +230,7 @@
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import _ from 'lodash'
|
|
|
|
import _ from 'lodash'
|
|
|
|
import { get, sync } from 'vuex-pathify'
|
|
|
|
import { get, sync } from 'vuex-pathify'
|
|
|
|
|
|
|
|
import Cookies from 'js-cookie'
|
|
|
|
import vueFilePond from 'vue-filepond'
|
|
|
|
import vueFilePond from 'vue-filepond'
|
|
|
|
import 'filepond/dist/filepond.min.css'
|
|
|
|
import 'filepond/dist/filepond.min.css'
|
|
|
|
|
|
|
|
|
|
|
@ -312,6 +313,17 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
currentAsset () {
|
|
|
|
currentAsset () {
|
|
|
|
return _.find(this.assets, ['id', this.currentFileId]) || {}
|
|
|
|
return _.find(this.assets, ['id', this.currentFileId]) || {}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
filePondServerOpts () {
|
|
|
|
|
|
|
|
const jwtToken = Cookies.get('jwt')
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
process: {
|
|
|
|
|
|
|
|
url: '/u',
|
|
|
|
|
|
|
|
headers: {
|
|
|
|
|
|
|
|
'Authorization': `Bearer ${jwtToken}`
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|