Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
PHP allows you to set the name attribute on the input field in such a way that multiple files are uploaded as an array. Transliteration doesn't take this possibility into account and runs into errors as it tries to pass arrays to preg_match() and strtolower()
This patch (built against 6.x-3.x, but successfully applied to 7.x-3.x) modifies transliteration_clean_filename() to behave recursively if $filename happens to be an array.
For an example of a module that uses this functionality, see the Webform Multifile sandbox module.
Comment | File | Size | Author |
---|---|---|---|
file-array-support.patch | 1.54 KB | cyborg_572 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedWorks for me as well
Coming from #1295334: Bring in experimental html5 multiple file uploading instead of using zip upload.
Comment #2
amateescu CreditAttribution: amateescu commentedCommited to 6.x-3.x and 7.x-3.x. Thanks!
http://drupalcode.org/project/transliteration.git/commit/17e9bda
http://drupalcode.org/project/transliteration.git/commit/0529dd9
Comment #3.0
(not verified) CreditAttribution: commentedfix link