Add ability to migrate Webform Multifile components

Created on 8 December 2020, almost 4 years ago
Updated 26 July 2023, over 1 year ago

Problem/Motivation

Add ability to migrate Webform Multifile ( https://www.drupal.org/project/webform_multifile β†’ ) elements.

It looks like that module is not supported any more due to some security issues but we had a use case where the old D7 site used those elements so ended up adding support for them so we can migrate them.

While running the migration we noticed the 'webform_multifile' module saves the maximum file size in KB as an integer (ie. 5000), compared to the normal webform file element where the unit is specified as part of the value (ie. 5 MB).
Because no size is specified the code Bytes::toInt($size) assume it's bytes and doesn't do anything to it, so further down when it divides the value by 1024 and then 1024 again you end up with a value smaller than 1 so it simply defaults to 1MB.

So all 'multifile' components gets migrated with a file size limit of 1MB.

This issue was also fixed as part of adding support for migrating that element type.

✨ Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom oldspot

Live updates comments and jobs are added and updated live.
  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024