Fix Exception in callback of async function: TypeError: this._now is not a function. Part 2.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2023-04-21 22:03:47 +03:00
parent 0d4ec25593
commit aef6967d4c

View file

@ -97,7 +97,7 @@ Attachments = new FilesCollection({
this._now = new Date();
Attachments.update({ _id: fileObj._id }, { $set: { "versions" : fileObj.versions } });
Attachments.update({ _id: fileObj.uploadedAtOstrio }, { $set: { "uploadedAtOstrio" : this._now() } });
Attachments.update({ _id: fileObj.uploadedAtOstrio }, { $set: { "uploadedAtOstrio" : this._now } });
let storageDestination = fileObj.meta.copyStorage || STORAGE_NAME_GRIDFS;
Meteor.defer(() => Meteor.call('validateAttachmentAndMoveToStorage', fileObj._id, storageDestination));