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.
| Comment | File | Size | Author |
|---|---|---|---|
| mm_cck_field_max_filesize.patch | 1.41 KB | civicpixel |
Comments
Comment #1
arthurf commentedPatch applied, ready for testing
Comment #2
civicpixel commented