- Issue created by @nycnuac
- Status changed to Needs review
about 1 month ago 1:35pm 28 May 2025 - πͺπΈSpain javilagos Zaragoza
Hello, I applied #4 to my Drupal 10.3 environment and, while it works, the available extensions for the newly uploaded file are hardcoded to be mainly for text files. This means that, if you come from an image file (e.g. a .jpeg), you could only upload a .txt, .pdf... with said patch. A proposed solution would be to allow any extension as per the base module intentions, changing
$new_file = file_save_upload('new_file', ['FileExtension' => []]);
Or check the file type to modify and limit the formats to the file type (which is not the base functionality but seems more desirable).