mirror of
https://github.com/getformwork/formwork.git
synced 2025-01-29 11:31:19 +01:00
Update mime types script
This commit is contained in:
parent
c942d97b43
commit
86f109c0ba
@ -24,7 +24,7 @@ class MimeType
|
||||
/**
|
||||
* Extension to MIME type mapping
|
||||
*
|
||||
* Last updated: 2024-11-09
|
||||
* Last updated: 2024-11-29
|
||||
*
|
||||
* @see scripts/update-mime-types.php To update this list
|
||||
*
|
||||
@ -1179,6 +1179,7 @@ class MimeType
|
||||
'vcs' => 'text/x-vcalendar',
|
||||
'vcf' => 'text/x-vcard',
|
||||
'yaml' => 'text/yaml',
|
||||
'yml' => 'text/yaml',
|
||||
'3gp' => 'video/3gpp',
|
||||
'3g2' => 'video/3gpp2',
|
||||
'h261' => 'video/h261',
|
||||
|
@ -23,7 +23,7 @@ $extensions = [
|
||||
'image/tiff' => ['tiff', 'tif'],
|
||||
'text/html' => ['html', 'htm'],
|
||||
'text/markdown' => ['md', 'markdown'],
|
||||
'text/yaml' => ['yaml', 'yaml'],
|
||||
'text/yaml' => ['yaml', 'yml'],
|
||||
];
|
||||
|
||||
foreach ($json as $mimeType => $data) {
|
||||
@ -69,10 +69,10 @@ if ($content === false) {
|
||||
|
||||
$content = preg_replace([
|
||||
'/Last updated: \d{4}-\d{2}-\d{2}\n/',
|
||||
'/protected const MIME_TYPES = \[.*?\];/s',
|
||||
'/protected const array MIME_TYPES = \[.*?\];/s',
|
||||
], [
|
||||
sprintf("Last updated: %s\n", date('Y-m-d')),
|
||||
sprintf("protected const MIME_TYPES = [\n%s\n ];", implode("\n", $lines)),
|
||||
sprintf("protected const array MIME_TYPES = [\n%s\n ];", implode("\n", $lines)),
|
||||
], $content);
|
||||
|
||||
file_put_contents($file, $content);
|
||||
|
Loading…
x
Reference in New Issue
Block a user