mirror of
https://github.com/a2nt/silverstripe-elemental-basics.git
synced 2024-10-22 17:05:54 +02:00
IMPR: Add video files
This commit is contained in:
parent
40f102b309
commit
2dbbd8521b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user