You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UploadFields that have been added to (say) edit forms do not appear to respect either of these configurations, and I am able to upload images and documents that are larger than both of these limits.
We were able to determine that the UploadField goes through the UploadReceiver::constructUploadReceiver(), and this is setting the max upload size from PHP ini, rather than from our configurations:
Also: Even if this was being fetched from configuration, it currently wouldn't support the categorisation that the AssetAdmin does.
Feature request
Have the UploadField respect the configuration defined for AssetAdmin::$max_upload_size or Upload_Validator::$default_max_file_size (including the ability to specify limits for different categories and/or extensions).
The text was updated successfully, but these errors were encountered:
You say feature request, but I'm going to label this a bug - I see no reason why the Upload_Validator::$default_max_file_size configuration shouldn't be respected, given that's the validator used by UploadField.
Preamble
Uploads made through the Asset admin area can be restricted with configuration. EG:
(You can also set file size limits by specific file extensions)
The result is that any images being uploaded must be 2MB or smaller, and any other file type (documents, videos, etc) must be 6MB or smaller.
There is also an
Upload_Validator
that supports the same configuration (though I didn't really dig into where this class is used). EG:Problem statement
UploadField
s that have been added to (say) edit forms do not appear to respect either of these configurations, and I am able to upload images and documents that are larger than both of these limits.We were able to determine that the
UploadField
goes through theUploadReceiver::constructUploadReceiver()
, and this is setting the max upload size from PHP ini, rather than from our configurations:Also: Even if this was being fetched from configuration, it currently wouldn't support the categorisation that the
AssetAdmin
does.Feature request
Have the
UploadField
respect the configuration defined forAssetAdmin::$max_upload_size
orUpload_Validator::$default_max_file_size
(including the ability to specify limits for different categories and/or extensions).The text was updated successfully, but these errors were encountered: