diff --git a/client/src/views/fields/attachment-multiple.js b/client/src/views/fields/attachment-multiple.js index d3173cbe9b..960bdd7cb8 100644 --- a/client/src/views/fields/attachment-multiple.js +++ b/client/src/views/fields/attachment-multiple.js @@ -340,6 +340,8 @@ Espo.define('views/fields/attachment-multiple', 'views/fields/base', function (D attachment.set('type', file.type || 'text/plain'); attachment.set('role', 'Attachment'); attachment.set('size', file.size); + attachment.set('parentType', this.model.name); + attachment.once('sync', function () { if (canceledList.indexOf(attachment.cid) === -1) { $att.trigger('ready'); diff --git a/client/src/views/fields/file.js b/client/src/views/fields/file.js index 91d27e5fc8..a9ef93d054 100644 --- a/client/src/views/fields/file.js +++ b/client/src/views/fields/file.js @@ -308,6 +308,7 @@ Espo.define('views/fields/file', 'views/fields/link', function (Dep) { attachment.set('type', fileParams.type || 'text/plain'); attachment.set('size', fileParams.size); attachment.set('role', 'Attachment'); + attachment.set('relatedType', this.model.name); attachment.once('sync', function () { if (!isCanceled) {