This is an updated version of a patch we've been using since 1.x -- basically it adds the 'max_filesize' field setting to the validation array before calling field_file_save_file. The use case in the open media project for this is:
1. On the field configuration for a filefield, user sets the file size restriction to 10G to accommodate large mpeg2 shows
2. Due to security and other performance issues, the PHP max post and file upload size is set to 50M
3. Without this patch, when media_mover calls field_file_save_file files > 50M are not saved as the default behavior without including the max_filesize in the validation array is to obey PHP's max post and file upload limits. With the patch, the 10G setting set by the user is passed along to field_file_save_file and we can programmatically save much larger files.

CommentFileSizeAuthor
mm_cck_field_max_filesize.patch1.41 KBcivicpixel

Comments

arthurf’s picture

Patch applied, ready for testing

civicpixel’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.