bug PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
11 Aug 2024

PR for #43387

the Base64 version of a string or file is typically roughly a third larger than its source so this adds a 1.33 factor to the size calculation

See #43387 and https://developer.mozilla.org/en-US/docs/Glossary/Base64#encoded_size_increase for more information

Test instructions

  • media manager set to 4mb
    Try to upload a file just below 4mb in size

Before

Image is rejected as too large

After

Image is accepted

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar joomla-cms-bot joomla-cms-bot - change - 11 Aug 2024
Category Administration com_media
avatar brianteeman brianteeman - open - 11 Aug 2024
avatar brianteeman brianteeman - change - 11 Aug 2024
Status New Pending
avatar brianteeman brianteeman - change - 11 Aug 2024
Labels Added: PR-4.4-dev
avatar Fedik
Fedik - comment - 11 Aug 2024

Thanks for your effort and for the hint.
However I just checked the ApiController code, and whole checkContent() is strange piece of code.

We actualy already have the file content in bytes at

$mediaContent = base64_decode($content->get('content', '', 'raw'));

that where the Controller should validate this size, instead of checking POST size as it done in checkContent().

avatar Fedik
Fedik - comment - 11 Aug 2024

Please check alternative #43906

avatar brianteeman brianteeman - change - 11 Aug 2024
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2024-08-11 11:33:36
Closed_By brianteeman
Labels Added: bug
avatar brianteeman
brianteeman - comment - 11 Aug 2024

closed in favour of #43906

avatar brianteeman brianteeman - close - 11 Aug 2024

Add a Comment

Login with GitHub to post a comment