? mm_cck_field_max_filesize.patch
Index: modules/mm_cck/mm_cck.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/media_mover/modules/mm_cck/Attic/mm_cck.module,v
retrieving revision 1.1.2.10
diff -u -p -r1.1.2.10 mm_cck.module
--- modules/mm_cck/mm_cck.module	18 Jul 2010 21:20:31 -0000	1.1.2.10
+++ modules/mm_cck/mm_cck.module	4 Aug 2010 16:03:40 -0000
@@ -230,7 +230,16 @@ function mm_cck_field_filefield(&$node, 
   if ($field['type'] == 'image') {
     $validators = array_merge(filefield_widget_upload_validators($field), imagefield_widget_upload_validators($field));
   }
-  else { $validators =  filefield_widget_upload_validators($field);}
+  else { 
+    $validators =  filefield_widget_upload_validators($field);
+
+    //Set filefield size validation to the per file limit set on the field. filefield_widget_upload_validators
+    //sets the max filesize to the sites PHP upload limit if the field setting is greater than the PHP upload limit.
+    //In the case of programmatic saving of files via media mover, we can use sizes greater than the PHP upload limit.
+    if($field['widget']['max_filesize_per_file']) {
+      $validators['filefield_validate_size'][0] = parse_size($field['widget']['max_filesize_per_file']);
+    }
+  }
 
   // now get the new field
   if (! $file = field_file_save_file($file_path, $validators, $destination_path)) {
