Fix: SVG file uploads broken (mime type: image/svg+xml)

This commit is contained in:
Lucas Bartholemy 2017-03-29 09:02:40 +02:00
parent 76ca0e522d
commit 0b08cd2325
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ HumHub Change Log
1.2.0 (in developement)
--------------------------------
- Fix: SVG file uploads broken (mime type: image/svg+xml)
1.2.0-beta.4 (March 28, 2017)
--------------------------------

View File

@ -59,7 +59,7 @@ class File extends FileCompat
{
return [
[['mime_type'], 'string', 'max' => 150],
[['mime_type'], 'match', 'not' => true, 'pattern' => '/[^a-zA-Z0-9\.ä\/\-]/', 'message' => Yii::t('FileModule.base', 'Invalid Mime-Type')],
[['mime_type'], 'match', 'not' => true, 'pattern' => '/[^a-zA-Z0-9\.ä\/\-\+]/', 'message' => Yii::t('FileModule.base', 'Invalid Mime-Type')],
[['file_name', 'title'], 'string', 'max' => 255],
[['size'], 'integer'],
];