-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with error reporting in media manager - Joomla 4.4 #43387
Comments
The 3.5 issue could be the result of rounding a float to an integer in combination with wrong logic so >= is used instead of > (which would be wrong of course, am just thinking about what could cause that). |
I'm debugging this issue and found that the Upload function of the Media Manager is using the File: readAsDataURL() method where the file's data is represented as a base64 encoded string. That means the size of the Base64 version of the file is typically roughly a third larger than its source, refer to Encoded size increase I tried multiplying filesize limit by 1.33 before checking the file size and it works: but I'm not sure whether this is the best approach to handle it, please let me know your thoughts. |
Steps to reproduce the issue
Expected result
Error reporting should be consistent with the scenario. It should not say the file is too large when it isn't bigger than the limits set in mediamanager - if these are lower than php. It should throw the error when the file is too big and not say it is uploaded.
Actual result
File is too big Error throws in scenerio where file is below the threshold. File uploaded message where the file is too big.
System information (as much as possible)
Additional comments
The text was updated successfully, but these errors were encountered: