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