mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
AddAsyncUpload.vue: add asyncupload form
This commit is contained in:
parent
5f71b46bb7
commit
f19a090549
@ -13,7 +13,7 @@
|
||||
</template>
|
||||
|
||||
<template v-slot:body>
|
||||
<div id="dropZoneWrapper">
|
||||
<div id="dropZoneWrapper" ref="dropZoneWrapper">
|
||||
<div
|
||||
data-stored-object="data-stored-object"
|
||||
data-label-preparing="Preparing"
|
||||
@ -29,6 +29,26 @@
|
||||
data-dict-remove="Remove existing file"
|
||||
data-allow-remove="true"
|
||||
data-temp-url-generator="url">
|
||||
<input
|
||||
type="hidden"
|
||||
data-async-file-upload="data-async-file-upload"
|
||||
data-generate-temp-url-post="/asyncupload/temp_url/generate/post?expires_delay=180&submit_delay=3600"
|
||||
data-temp-url-get="/asyncupload/temp_url/generate/GET"
|
||||
:data-max-files="options.maxFiles"
|
||||
:data-max-post-size="options.maxPostSize"
|
||||
>
|
||||
<input
|
||||
type="hidden"
|
||||
data-stored-object-key="1"
|
||||
>
|
||||
<input
|
||||
type="hidden"
|
||||
data-stored-object-iv="1"
|
||||
>
|
||||
<input
|
||||
type="hidden"
|
||||
data-async-file-type="1"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -53,6 +73,7 @@ export default {
|
||||
},
|
||||
props: [
|
||||
'buttonTitle',
|
||||
'options'
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
@ -62,12 +83,17 @@ export default {
|
||||
},
|
||||
}
|
||||
},
|
||||
updated() {
|
||||
if (this.modal.showModal){
|
||||
searchForZones(this.$refs.dropZoneWrapper);
|
||||
}
|
||||
},
|
||||
// mounted() {
|
||||
// console.log(this.options)
|
||||
// },
|
||||
methods: {
|
||||
openModal() {
|
||||
this.modal.showModal = true;
|
||||
let dropZoneWrapper = document.getElementById('dropZoneWrapper');
|
||||
console.log(dropZoneWrapper)
|
||||
searchForZones(document); //TODO: only searchforzone in modal body
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -106,6 +106,7 @@
|
||||
<li>
|
||||
<add-async-upload
|
||||
:buttonTitle="$t('browse')"
|
||||
:options="asyncUploadOptions"
|
||||
>
|
||||
</add-async-upload>
|
||||
</li>
|
||||
@ -163,6 +164,10 @@ export default {
|
||||
return {
|
||||
editor: ClassicEditor,
|
||||
template: null,
|
||||
asyncUploadOptions: {
|
||||
maxFiles: 1,
|
||||
maxPostSize: 15000000
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user