add code comments
[civicrm-core.git] / js / angular-crmAttachment.js
index bc0ec6c4c30c91a14267987a784d7ba6e39bcbae..815ae36b84c01b455458e3214f05af3dd05ebc51 100644 (file)
@@ -76,7 +76,7 @@
             var newItems = crmAttachments.uploader.getNotUploadedItems();
             if (newItems.length > 0) {
               _.each(newItems, function (item) {
-                item.formData = [_.extend({}, target, item.crmData)];
+                item.formData = [_.extend({crm_attachment_token: CRM.crmAttachment.token}, target, item.crmData)];
               });
               crmAttachments.uploader.onCompleteAll = function onCompleteAll() {
                 delete crmAttachments.uploader.onCompleteAll;