MDL-81437 core_files: Adding webp to the standard included MIME types

Co-authored-by: Luca Bösch <luca.boesch@bfh.ch>
This commit is contained in:
Daniel Ziegenberg 2025-03-14 15:05:45 +01:00
parent 38ca98b632
commit 13743de30b
No known key found for this signature in database
GPG key ID: 7E6F98FFADBEFD39
3 changed files with 11 additions and 1 deletions

View file

@ -292,6 +292,8 @@ abstract class core_filetypes {
'string' => 'audio'),
'webm' => array('type' => 'video/webm', 'icon' => 'video', 'groups' => array('html_video', 'video', 'web_video'),
'string' => 'video'),
'webp' => ['type' => 'image/webp', 'icon' => 'image', 'groups' => ['image', 'web_image', 'optimised_image'],
'string' => 'image'],
'wmv' => array('type' => 'video/x-ms-wmv', 'icon' => 'video', 'groups' => array('video'), 'string' => 'video'),
'asf' => array('type' => 'video/x-ms-asf', 'icon' => 'video', 'groups' => array('video'), 'string' => 'video'),
'wma' => array('type' => 'audio/x-ms-wma', 'icon' => 'audio', 'groups' => array('audio'), 'string' => 'audio'),

View file

@ -1632,5 +1632,13 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2025031800.04);
}
if ($oldversion < 2025032800.01) {
// Upgrade webp mime type for existing webp files.
upgrade_create_async_mimetype_upgrade_task('image/webp', ['webp']);
// Main savepoint reached.
upgrade_main_savepoint(true, 2025032800.01);
}
return true;
}

View file

@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2025032800.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2025032800.01; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '5.0dev+ (Build: 20250328)'; // Human-friendly version name