IMPR: Add video files

This commit is contained in:
Tony Air 2022-07-08 20:46:11 +02:00
parent 40f102b309
commit 2dbbd8521b

View File

@ -116,7 +116,10 @@ class SlideImageEx extends DataExtension
->setAllowedExtensions(['mp4'])
->setFolderName('Uploads/SlideVideos');
$maxFileSize = $videoUpload->getValidator()->getAllowedMaxFileSize('mp4');
$validator = $videoUpload->getValidator();
$validator->setAllowedMaxFileSize(['mp4' => 300000000]);
$maxFileSize = $validator->getAllowedMaxFileSize('mp4');
$videoUpload->setTitle('Video File (max size: '.self::formatBytes($maxFileSize).')');
$fields->insertAfter('Headline', $videoUpload);