-
Notifications
You must be signed in to change notification settings - Fork 87
Description
Describe your motivation
There is no way to restrict a user from uploading images with arbitrary size into the fields. This can have a huge negative impact by slowing down pages with RTEs that have a lot of images/ big images.
The upload file has the setMaxFileSize method, but nothing similar is implemented in the RTE.
The RTE doesn't provide any helpers/api to check if an image was uploaded into the field and what is the value/length of the uploaded image.
Describe the solution you'd like
It would be beneficial and really helpful if _uploadImage method fired on reader.onload upload would return additional information such as e.loaded https://developer.mozilla.org/en-US/docs/Web/API/FileReader/load_event
Even better if there would be the same method as in the upload field restricting size of the images. Then image will not be added to the field at all.
Describe alternatives you've considered
No response
Additional context
No response