diff --git a/frontend/src/components/DocumentUpload.vue b/frontend/src/components/DocumentUpload.vue index 1c5871d..c222d04 100644 --- a/frontend/src/components/DocumentUpload.vue +++ b/frontend/src/components/DocumentUpload.vue @@ -16,7 +16,7 @@ label="Document Type" /> @@ -170,13 +170,12 @@ export default { submitRequest() { if (this.dataReady) { try { - const [ file ] = this.fileArray; this.active = true; const reader = new FileReader(); reader.onload = this.uploadFile; reader.onabort = this.handleFileReadErr; reader.onerror = this.handleFileReadErr; - reader.readAsBinaryString(file); + reader.readAsBinaryString(this.inputFile); } catch (e) { this.handleFileReadErr(); throw e; @@ -188,12 +187,11 @@ export default { this.setErrorAlert('Sorry, an unexpected error seems to have occurred. Try uploading your files later.'); }, async uploadFile(env) { - const [ file ] = this.fileArray; let document = { documentTypeCode: this.documentTypeCode, - fileName: getFileNameWithMaxNameLength(file.name), - fileExtension: file.type, - fileSize: file.size, + fileName: getFileNameWithMaxNameLength(this.inputFile.name), + fileExtension: this.inputFile.type, + fileSize: this.inputFile.size, documentData: btoa(env.target.result) }; diff --git a/frontend/src/plugins/vuetify.js b/frontend/src/plugins/vuetify.js index c7d835f..329923b 100644 --- a/frontend/src/plugins/vuetify.js +++ b/frontend/src/plugins/vuetify.js @@ -40,6 +40,7 @@ import { VStepperWindow, VStepperWindowItem, VTable, + VTextarea, VTextField, VToolbar, VToolbarTitle @@ -94,6 +95,7 @@ export default new createVuetify({ VStepperWindow, VStepperWindowItem, VTable, + VTextarea, VTextField, VToolbar, VToolbarTitle