Magento 2 : How Can Directly Upload Video to Product












1















I know that, we can upload video via Vimeo and Youtube video url in the product from admin.



However I cannot find a way to directly upload video file same as product image.



Does this means that I cannot host product video in my Magento server?










share|improve this question

























  • you have two options for upload video in magento 2. 1) upload video via google drive (blog.belvg.com/…) 2) install third party extension to upload video (fmeextensions.com/product-videos-magento-2.html)

    – Nits
    Jan 30 '17 at 10:52


















1















I know that, we can upload video via Vimeo and Youtube video url in the product from admin.



However I cannot find a way to directly upload video file same as product image.



Does this means that I cannot host product video in my Magento server?










share|improve this question

























  • you have two options for upload video in magento 2. 1) upload video via google drive (blog.belvg.com/…) 2) install third party extension to upload video (fmeextensions.com/product-videos-magento-2.html)

    – Nits
    Jan 30 '17 at 10:52
















1












1








1








I know that, we can upload video via Vimeo and Youtube video url in the product from admin.



However I cannot find a way to directly upload video file same as product image.



Does this means that I cannot host product video in my Magento server?










share|improve this question
















I know that, we can upload video via Vimeo and Youtube video url in the product from admin.



However I cannot find a way to directly upload video file same as product image.



Does this means that I cannot host product video in my Magento server?







magento2 product admin file-upload video






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 30 '17 at 11:20









SR_Magento

3,334114795




3,334114795










asked Jan 25 '17 at 1:04









user1506075user1506075

296211




296211













  • you have two options for upload video in magento 2. 1) upload video via google drive (blog.belvg.com/…) 2) install third party extension to upload video (fmeextensions.com/product-videos-magento-2.html)

    – Nits
    Jan 30 '17 at 10:52





















  • you have two options for upload video in magento 2. 1) upload video via google drive (blog.belvg.com/…) 2) install third party extension to upload video (fmeextensions.com/product-videos-magento-2.html)

    – Nits
    Jan 30 '17 at 10:52



















you have two options for upload video in magento 2. 1) upload video via google drive (blog.belvg.com/…) 2) install third party extension to upload video (fmeextensions.com/product-videos-magento-2.html)

– Nits
Jan 30 '17 at 10:52







you have two options for upload video in magento 2. 1) upload video via google drive (blog.belvg.com/…) 2) install third party extension to upload video (fmeextensions.com/product-videos-magento-2.html)

– Nits
Jan 30 '17 at 10:52












3 Answers
3






active

oldest

votes


















0














Yes, you can only upload video to Magento 2 product via YouTube or Vimeo.






share|improve this answer































    0














    As an alternative solution, if you don't want to use YouTube or Vimeo, upload file directly in to your server, and using browser native html video tag, you can insert video manually. Just simple example bellow, inside product page description.



    <video width="480" controls>
    <source src="/pub/media/video/your-video-file.mp4" type="video/mp4">
    </video>





    share|improve this answer































      0














      If Display video in product page using mp4 video and another types of video



      We have to need create attribute for add video name



      Then get this video name to where want to display video



      <?php
      $_helper = $this->helper('MagentoCatalogHelperOutput');
      $objectManager = MagentoFrameworkAppObjectManager::getInstance();
      $_product = $objectManager->get('MagentoFrameworkRegistry')->registry('current_product');//get current product
      ?>

      <?php if($proVideo = $_helper->productAttribute($_product,$_product->getVideoName(), 'video_name')):?>
      <?php $videoUrl = $this->getUrl('pub/media/catalog/product/videos/').$proVideo; ?>
      <div class="prod_video_bg">
      <video width="400" controls>
      <source src="<?php echo $videoUrl; ?>" type="video/mp4">
      </video>
      </div>
      <?php endif; ?>




      share























        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "479"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f156286%2fmagento-2-how-can-directly-upload-video-to-product%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        0














        Yes, you can only upload video to Magento 2 product via YouTube or Vimeo.






        share|improve this answer




























          0














          Yes, you can only upload video to Magento 2 product via YouTube or Vimeo.






          share|improve this answer


























            0












            0








            0







            Yes, you can only upload video to Magento 2 product via YouTube or Vimeo.






            share|improve this answer













            Yes, you can only upload video to Magento 2 product via YouTube or Vimeo.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jan 30 '17 at 10:37









            Muneeb SyedMuneeb Syed

            617215




            617215

























                0














                As an alternative solution, if you don't want to use YouTube or Vimeo, upload file directly in to your server, and using browser native html video tag, you can insert video manually. Just simple example bellow, inside product page description.



                <video width="480" controls>
                <source src="/pub/media/video/your-video-file.mp4" type="video/mp4">
                </video>





                share|improve this answer




























                  0














                  As an alternative solution, if you don't want to use YouTube or Vimeo, upload file directly in to your server, and using browser native html video tag, you can insert video manually. Just simple example bellow, inside product page description.



                  <video width="480" controls>
                  <source src="/pub/media/video/your-video-file.mp4" type="video/mp4">
                  </video>





                  share|improve this answer


























                    0












                    0








                    0







                    As an alternative solution, if you don't want to use YouTube or Vimeo, upload file directly in to your server, and using browser native html video tag, you can insert video manually. Just simple example bellow, inside product page description.



                    <video width="480" controls>
                    <source src="/pub/media/video/your-video-file.mp4" type="video/mp4">
                    </video>





                    share|improve this answer













                    As an alternative solution, if you don't want to use YouTube or Vimeo, upload file directly in to your server, and using browser native html video tag, you can insert video manually. Just simple example bellow, inside product page description.



                    <video width="480" controls>
                    <source src="/pub/media/video/your-video-file.mp4" type="video/mp4">
                    </video>






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Oct 25 '18 at 4:10









                    crashtestxxxcrashtestxxx

                    168310




                    168310























                        0














                        If Display video in product page using mp4 video and another types of video



                        We have to need create attribute for add video name



                        Then get this video name to where want to display video



                        <?php
                        $_helper = $this->helper('MagentoCatalogHelperOutput');
                        $objectManager = MagentoFrameworkAppObjectManager::getInstance();
                        $_product = $objectManager->get('MagentoFrameworkRegistry')->registry('current_product');//get current product
                        ?>

                        <?php if($proVideo = $_helper->productAttribute($_product,$_product->getVideoName(), 'video_name')):?>
                        <?php $videoUrl = $this->getUrl('pub/media/catalog/product/videos/').$proVideo; ?>
                        <div class="prod_video_bg">
                        <video width="400" controls>
                        <source src="<?php echo $videoUrl; ?>" type="video/mp4">
                        </video>
                        </div>
                        <?php endif; ?>




                        share




























                          0














                          If Display video in product page using mp4 video and another types of video



                          We have to need create attribute for add video name



                          Then get this video name to where want to display video



                          <?php
                          $_helper = $this->helper('MagentoCatalogHelperOutput');
                          $objectManager = MagentoFrameworkAppObjectManager::getInstance();
                          $_product = $objectManager->get('MagentoFrameworkRegistry')->registry('current_product');//get current product
                          ?>

                          <?php if($proVideo = $_helper->productAttribute($_product,$_product->getVideoName(), 'video_name')):?>
                          <?php $videoUrl = $this->getUrl('pub/media/catalog/product/videos/').$proVideo; ?>
                          <div class="prod_video_bg">
                          <video width="400" controls>
                          <source src="<?php echo $videoUrl; ?>" type="video/mp4">
                          </video>
                          </div>
                          <?php endif; ?>




                          share


























                            0












                            0








                            0







                            If Display video in product page using mp4 video and another types of video



                            We have to need create attribute for add video name



                            Then get this video name to where want to display video



                            <?php
                            $_helper = $this->helper('MagentoCatalogHelperOutput');
                            $objectManager = MagentoFrameworkAppObjectManager::getInstance();
                            $_product = $objectManager->get('MagentoFrameworkRegistry')->registry('current_product');//get current product
                            ?>

                            <?php if($proVideo = $_helper->productAttribute($_product,$_product->getVideoName(), 'video_name')):?>
                            <?php $videoUrl = $this->getUrl('pub/media/catalog/product/videos/').$proVideo; ?>
                            <div class="prod_video_bg">
                            <video width="400" controls>
                            <source src="<?php echo $videoUrl; ?>" type="video/mp4">
                            </video>
                            </div>
                            <?php endif; ?>




                            share













                            If Display video in product page using mp4 video and another types of video



                            We have to need create attribute for add video name



                            Then get this video name to where want to display video



                            <?php
                            $_helper = $this->helper('MagentoCatalogHelperOutput');
                            $objectManager = MagentoFrameworkAppObjectManager::getInstance();
                            $_product = $objectManager->get('MagentoFrameworkRegistry')->registry('current_product');//get current product
                            ?>

                            <?php if($proVideo = $_helper->productAttribute($_product,$_product->getVideoName(), 'video_name')):?>
                            <?php $videoUrl = $this->getUrl('pub/media/catalog/product/videos/').$proVideo; ?>
                            <div class="prod_video_bg">
                            <video width="400" controls>
                            <source src="<?php echo $videoUrl; ?>" type="video/mp4">
                            </video>
                            </div>
                            <?php endif; ?>





                            share











                            share


                            share










                            answered 1 min ago









                            AB SaiyadAB Saiyad

                            594




                            594






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Magento Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f156286%2fmagento-2-how-can-directly-upload-video-to-product%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Polycentropodidae

                                Magento 2 Error message: Invalid state change requested

                                Paulmy