I'd like to make a small request regarding only a specific piece of the max filesize issue previously discussed at #1060448: Support for max upload size and resize parameters.
I noticed that the plupload js options include max_file_size for client-side validation. I took a look at how plupload_element_pre_render() checks #upload_validators and if file_validate_extensions() is included, the value is passed into the js settings for that form element. I think it'd be helpful to similarly check #upload_validators for file_validate_size() and pass the limit value to the max_file_size js setting.
This way, modules generating/altering forms to use the plupload form element can easily specify a max file size that gets validated both server- and client-side. This would not introduce any additional configuration nor is it dependent on any field's settings.
Comments
Comment #1
slashrsm CreditAttribution: slashrsm commentedSure. It sounds very nice feature. We should definitely add that.
Comment #2
artematem CreditAttribution: artematem at FFW commentedWorkaround:
Looking forward for better implementation of file size validation)