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 { .vue-dropzone {
display: none; display: none;
} }
.upload-wrapper {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 1.5rem;
}
.preview-container { .preview-container {
display: grid; display: grid;
grid-gap: 0.5rem; grid-gap: 0.5rem;

View File

@ -5,9 +5,14 @@
> >
<!-- Add New Image --> <!-- Add New Image -->
<a href="javascript:;" class="upload-button" ref="addQueueTrigger" v-show="addVisible"> <div class="upload-wrapper" v-show="addVisible">
<span class="upload-button-icon oc-icon-upload"></span> <a href="javascript:;" class="upload-button" ref="addQueueTrigger">
</a> <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> <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.$refs.dropzone.removeFile(file);
this.addVisible = true; this.addVisible = true;
}); });
},
openDatabase() {
}, },
onSend(file, xhr, formData) { onSend(file, xhr, formData) {
formData.append('extraData', JSON.stringify({ formData.append('extraData', JSON.stringify({