diff --git a/composer.patches.json b/composer.patches.json index f10389115..6e8ec953c 100644 --- a/composer.patches.json +++ b/composer.patches.json @@ -11,6 +11,7 @@ "Issue #3001188: Make it possible to add relationships to layout builder": "./patches/3001188-make-it-possible-to-add-relationships-to-layout-builder.patch", "Issue #2329253: Allow the ChangedItem to skip updating the entity's changed timestamp when synchronizing (f.e. when migrating)": "https://www.drupal.org/files/issues/2024-07-30/2329253-10.x.patch", "Issue #3467860: Ensure consistent library ordering between page an asset requests when calculating asset aggregates": "./patches/3467860.mr-9219.patch", + "Issue #3487488: ExtensionMimeTypeGuesser::guessMimeType must support file names with '0' (zero) in the extension parts like foo.0.zip": "https://git.drupalcode.org/project/drupal/-/commit/0475ceccefc.patch", "Issue #?? (maybe #2837833): 'Required contexts without a value": "./patches/missing-context-value-in-layout-builder-admin.patch" }, "drupal/flat_taxonomy": { diff --git a/html/modules/custom/ghi_image/ghi_image.deploy.php b/html/modules/custom/ghi_image/ghi_image.deploy.php new file mode 100644 index 000000000..72d245bc9 --- /dev/null +++ b/html/modules/custom/ghi_image/ghi_image.deploy.php @@ -0,0 +1,25 @@ +getStorage('file')->loadByProperties([ + 'filemime' => 'application/octet-stream', + ]); + /** @var \Drupal\Core\File\MimeType\MimeTypeGuesser $mime_type_guesser */ + $mime_type_guesser = \Drupal::service('file.mime_type.guesser'); + foreach ($files as $file) { + $mime_type = $mime_type_guesser->guessMimeType($file->getFileUri()); + if ($file->getMimeType() != $mime_type) { + $file->setMimeType($mime_type); + $file->save(); + } + } +}