Problem/Motivation
When uploading a video, this media type have a file limit that could be expressed with string like 100 MB.
However when uploading a video through drag & drop you will encounter an error :
TypeError: Cannot assign string to property Drupal\file\Plugin\Validation\Constraint\FileSizeLimitConstraint::$fileLimit of type int in Symfony\Component\Validator\Constraint->__construct() (line 133 of /opt/www/d10/vendor/symfony/validator/Constraint.php).
Steps to reproduce
- Install the module.
- Set up a file limit for media video, like 100 MB, in /admin/structure/media/manage/video/fields/media.video.field_media_video_file (default install for media video)
- Try to upload a video and nothing will happen
- Check the "Recent log messages" report
Proposed resolution
When using the UI to upload, the constraint validation isn't using the function Bytes::toNumber() to check this file limit.
Remaining tasks
MR to be submitted.
User interface changes
None
API changes
None
Data model changes
Issue fork media_folders-3555601
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
tostinni commentedMR submitted switching to "needs review".
Comment #5
jmauricio commentedmerged into 1.0.x
Comment #6
jmauricio commentedreleased in 1.0.7