Skip to content

Commit

Permalink
bug fix for uploading files
Browse files Browse the repository at this point in the history
  • Loading branch information
LocalNewsTV committed Nov 6, 2023
1 parent 4df9880 commit de7909a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/frontend/src/common/store/documents.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ export default {
return previousPromise.then((results) => {
// use override file name if it exists
let fileName;
console.log(file);
if(file.file){
fileName = file.file.name;
isPrivate = file.private;
file = file.file;
} else {
fileName = fileNames[i] || file.name
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,14 @@ export default {
}
},
computedAttachments () {
return this.attachmentsData ? JSON.stringify(this.attachmentsData) : JSON.stringify([]);
return this.attachmentsData || [];
},
},
watch: {
computedAttachments: {
deep: true,
handler: function (newAttachments, oldAttachments) {
let jsonNewAttachments = JSON.parse(newAttachments);
let jsonNewAttachments = newAttachments;
// We have at least one new attachment
if (jsonNewAttachments[0].file) {
jsonNewAttachments.forEach((newAttachment, index) => {
Expand Down

0 comments on commit de7909a

Please sign in to comment.