I can't upload a video file through WYSIWYG editor. Sometimes it says File validation failed.. Sometimes it simply doesn't do anything while uploading a file.
Kindly help me.
-
Hi What video file? mp4? avi?BartZalas– BartZalas2018年07月05日 13:21:33 +00:00Commented Jul 5, 2018 at 13:21
-
both video filePrashant Patel– Prashant Patel2018年07月05日 14:03:56 +00:00Commented Jul 5, 2018 at 14:03
-
on witch one you had error? because avi is supported , mp4 no and you need add functionality for second oneBartZalas– BartZalas2018年07月05日 14:15:32 +00:00Commented Jul 5, 2018 at 14:15
-
Can you try to upload first avi file from this site engr.colostate.edu/me/facil/dynamics/avis.htm and tell me is it working. In magento upload choice html5BartZalas– BartZalas2018年07月05日 14:58:54 +00:00Commented Jul 5, 2018 at 14:58
2 Answers 2
You can add mp4 for example that way:
Copy vendor/magento/module-cms/etc/di.xml
to yourvendor/YourTheme/Magento_Cms/etc/di.xml
and add this to media_allowed
<item name="mp4" xsi:type="number">1</item>
If you're looking to upload product video then there is one more method do it via YouTube. These are the steps which you have to follow:
- Upload your video to YouTube.
- Go to google developer console and generate YouTube Data API.
- Then add the generated Youtube API key to your Magento 2 store by going to STORES --> Configuration.
- At last, just add Video URL (YouTube) to your product edit page.