REF Ensure that when doing RLIKE BINARY the field is cast as BINARY to prevent issue...
[civicrm-core.git] / ang / crmAttachment.js
index 35dd1c582fe22fa8396b914c2321e1ff76775b1e..16bb212553c6e1bb6b038984b15f75fc7e479213 100644 (file)
@@ -1,7 +1,7 @@
 /// crmFile: Manage file attachments
 (function (angular, $, _) {
 
-  angular.module('crmAttachment', ['angularFileUpload']);
+  angular.module('crmAttachment', CRM.angRequires('crmAttachment'));
 
   // crmAttachment manages the list of files which are attached to a given entity
   angular.module('crmAttachment').factory('CrmAttachments', function (crmApi, crmStatus, FileUploader, $q) {
         var model = $parse(attr.crmAttachments);
         scope.att = model(scope.$parent);
         scope.ts = CRM.ts(null);
+        CRM.api4('Setting', 'get', {
+          select: ["maxFileSize"]
+        }).then(function(settings) {
+          scope.max_size = settings[0].value;
+        });
         scope.inclUrl = '~/crmAttachment/attachments.html';
 
         // delay rendering of child tree until after model has been populated