This commit is contained in:
2020-04-24 19:59:37 +00:00
parent a94792d77c
commit b7d4cd9f6c
2 changed files with 17 additions and 4 deletions

View File

@@ -1,5 +1,11 @@
<template>
<div class="mt-6" v-resize="onResize">
<div
class="mt-6"
v-resize="onResize"
v-cloak
@drop.prevent="onDrop"
@dragover.prevent
>
<span class="v-label v-label--active theme--light">
{{ $ay.t("Attachments") }}
</span>
@@ -235,7 +241,7 @@ export default {
ret.push({
id: o.id,
concurrencyToken: o.concurrencyToken,
url: window.$gz.api.downloadUrl(o.id,o.contentType),
url: window.$gz.api.downloadUrl(o.id, o.contentType),
name: o.displayFileName,
date: window.$gz.locale.utcDateToShortDateAndTimeLocalized(
o.lastModified,
@@ -313,6 +319,14 @@ export default {
.catch(function handleUploadError(error) {
window.$gz.errorHandler.handleFormError(error);
});
},
onDrop(ev) {
//handle file drop
var files = Array.from(ev.dataTransfer.files);
if (files.length > 0) {
this.uploadFiles = files;
this.upload();
}
}
//-----
}