fix: Elenco delle estensioni file per mime type

This commit is contained in:
Luca 2024-11-06 11:33:55 +01:00
parent 5d70b4ef19
commit e0a4ce1f52
1 changed files with 11 additions and 1 deletions

View File

@ -29,13 +29,23 @@ class Upload extends Model
{ {
use SimpleModelTrait; use SimpleModelTrait;
/** @var array Elenco delle estensioni file per mime type */ /**
* Elenco delle estensioni file per mime type.
* Fonte: https://www.iana.org/assignments/media-types/media-types.xhtml
*
* @var array $extension_association
*
*/
protected static $extension_association = [ protected static $extension_association = [
'image/gif' => 'gif', 'image/gif' => 'gif',
'image/bmp' => 'bmp', 'image/bmp' => 'bmp',
'image/jpg' => 'jpg', 'image/jpg' => 'jpg',
'image/jpeg' => 'jpg', 'image/jpeg' => 'jpg',
'image/png' => 'png', 'image/png' => 'png',
'image/heic' => 'heic',
'image/webp' => 'webp',
'image/svg+xml' => 'svg',
'image/tiff' => 'tiff',
]; ];
protected $table = 'zz_files'; protected $table = 'zz_files';