This commit is contained in:
2020-04-25 15:08:04 +00:00
parent 7d89113ac9
commit 3255d0204f
2 changed files with 7 additions and 2 deletions

View File

@@ -431,6 +431,7 @@ export default {
data.append("AttachToObjectType", at.ayaType);
data.append("AttachToObjectId", at.ayaId);
data.append("Notes", at.notes);
data.append("FileData", at.fileData);
//-----------------

View File

@@ -95,8 +95,6 @@
chips
></v-file-input>
<v-text-field
v-model="notes"
:label="$ay.t('AttachmentNotes')"
@@ -187,10 +185,16 @@ export default {
upload() {
//similar code in wiki-control
let vm = this;
let fileData = [];
for (let i = 0; i < vm.uploadFiles.length; i++) {
let f = vm.uploadFiles[i];
fileData.push({ name: f.name, lastModified: f.lastModified });
}
let at = {
ayaId: vm.ayaId,
ayaType: vm.ayaType,
files: vm.uploadFiles,
fileData: JSON.stringify(fileData), //note this is required for an array or it will come to the server as a string [object,object]
notes: vm.notes ? vm.notes : ""
};