Add trigger for database upload

This commit is contained in:
philipp lang 2020-10-27 02:30:16 +01:00
parent fe0bf5e7b3
commit 45b6747059
2 changed files with 16 additions and 3 deletions

View File

@ -160,6 +160,11 @@
.vue-dropzone {
display: none;
}
.upload-wrapper {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 1.5rem;
}
.preview-container {
display: grid;
grid-gap: 0.5rem;

View File

@ -5,9 +5,14 @@
>
<!-- Add New Image -->
<a href="javascript:;" class="upload-button" ref="addQueueTrigger" v-show="addVisible">
<span class="upload-button-icon oc-icon-upload"></span>
</a>
<div class="upload-wrapper" v-show="addVisible">
<a href="javascript:;" class="upload-button" ref="addQueueTrigger">
<span class="upload-button-icon oc-icon-upload"></span>
</a>
<a href="javascript:;" @click="openDatabase" class="upload-button">
<span class="upload-button-icon oc-icon-database"></span>
</a>
</div>
<vue-dropzone @vdropzone-mounted="onMount" @vdropzone-removed-file="onRemove" @vdropzone-success="onUploadSuccess" @vdropzone-sending="onSend" @vdropzone-thumbnail="onAdd" v-if="loaded" ref="dropzone" :id="id" :options="dropzoneOptions"></vue-dropzone>
@ -119,6 +124,9 @@ export default {
this.$refs.dropzone.removeFile(file);
this.addVisible = true;
});
},
openDatabase() {
},
onSend(file, xhr, formData) {
formData.append('extraData', JSON.stringify({