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
e2c9f0a376
commit
3b753a8a78
@ -66,3 +66,9 @@ DNADesign\ElementalVirtual\Model\ElementVirtual:
|
||||
Dynamic\FlexSlider\Model\SlideImage:
|
||||
extensions:
|
||||
- A2nt\ElementalBasics\Extensions\SlideImageEx
|
||||
|
||||
SilverStripe\Assets\File:
|
||||
extensions:
|
||||
- LeKoala\FilePond\FilePondFileExtension
|
||||
LeKoala\FilePond\FilePondField:
|
||||
enable_auto_thumbnails: true
|
||||
|
@ -21,7 +21,8 @@
|
||||
"dynamic/silverstripe-elemental-flexslider": "*",
|
||||
"dynamic/silverstripe-elemental-image": "*",
|
||||
"gorriecoe/silverstripe-linkfield": "*",
|
||||
"a2nt/silverstripe-mapboxfield": "dev-master"
|
||||
"a2nt/silverstripe-mapboxfield": "dev-master",
|
||||
"lekoala/silverstripe-filepond": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7"
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
namespace A2nt\ElementalBasics\Extensions;
|
||||
|
||||
use LeKoala\FilePond\FilePondField;
|
||||
use A2nt\ElementalBasics\Elements\SliderElement;
|
||||
use SilverStripe\AssetAdmin\Forms\UploadField;
|
||||
use SilverStripe\Assets\File;
|
||||
@ -111,7 +112,8 @@ class SlideImageEx extends DataExtension
|
||||
'DateOff',
|
||||
]);
|
||||
|
||||
$videoUpload = UploadField::create('VideoFile')
|
||||
$videoUpload = FilePondField::create('VideoFile')
|
||||
->setChunkUploads(true)
|
||||
->setAllowedExtensions(['mp4'])
|
||||
->setFolderName('Uploads/SlideVideos');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user