This commit is contained in:
@@ -431,6 +431,7 @@ export default {
|
|||||||
data.append("AttachToObjectType", at.ayaType);
|
data.append("AttachToObjectType", at.ayaType);
|
||||||
data.append("AttachToObjectId", at.ayaId);
|
data.append("AttachToObjectId", at.ayaId);
|
||||||
data.append("Notes", at.notes);
|
data.append("Notes", at.notes);
|
||||||
|
data.append("FileData", at.fileData);
|
||||||
|
|
||||||
//-----------------
|
//-----------------
|
||||||
|
|
||||||
|
|||||||
@@ -95,8 +95,6 @@
|
|||||||
chips
|
chips
|
||||||
></v-file-input>
|
></v-file-input>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="notes"
|
v-model="notes"
|
||||||
:label="$ay.t('AttachmentNotes')"
|
:label="$ay.t('AttachmentNotes')"
|
||||||
@@ -187,10 +185,16 @@ export default {
|
|||||||
upload() {
|
upload() {
|
||||||
//similar code in wiki-control
|
//similar code in wiki-control
|
||||||
let vm = this;
|
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 = {
|
let at = {
|
||||||
ayaId: vm.ayaId,
|
ayaId: vm.ayaId,
|
||||||
ayaType: vm.ayaType,
|
ayaType: vm.ayaType,
|
||||||
files: vm.uploadFiles,
|
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 : ""
|
notes: vm.notes ? vm.notes : ""
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user