Answers for "how to upload large video file in php"

PHP
0

how to upload large video file in php

php_value upload_max_filesize 50M
php_value post_max_size 50M
php_value max_input_time 300
php_value max_execution_time 300
Posted by: Guest on May-05-2020
0

how to upload large video file in php

<!DOCTYYPE html>
<html>
  <head>
    <title>Chunking Upload Demo</title>
    <script src="vendor/moxiecode/plupload/js/plupload.full.min.js"></script>
    <script>
      window.addEventListener("load", function () {
        var path = "vendor/moxiecode/plupload/js/`";
        var uploader = new plupload.Uploader({
          runtimes: 'html5,flash,silverlight,html4',
          flash_swf_url: path + 'Moxie.swf',
          silverlight_xap_url: path + '/Moxie.xap',
          browse_button: 'pickfiles',
          container: document.getElementById('container'),
          url: '2b-upload.php',
          chunk_size: '200kb',
          max_retries: 2,
          filters: {
            max_file_size: '10mb',
            mime_types: [{title: "Image files", extensions: "jpg,gif,png"}]
          },
          init: {
            PostInit: function () {
              document.getElementById('filelist').innerHTML = '';
            },
            FilesAdded: function (up, files) {
              plupload.each(files, function (file) {
                document.getElementById('filelist').innerHTML += '<div id="' + file.id + '">' + file.name + ' (' + plupload.formatSize(file.size) + ') <b></b></div>';
              });
              uploader.start();
            },
            UploadProgress: function (up, file) {
              document.getElementById(file.id).getElementsByTagName('b')[0].innerHTML = '<span>' + file.percent + "%</span>";
            },
            Error: function (up, err) {
              // DO YOUR ERROR HANDLING!
              console.log(err);
            }
          }
        });
        uploader.init();
      });
    </script>
  </head>
  <body>
    <div id="container">
      <span id="pickfiles">[Upload files]</span>
    </div>
    <div id="filelist">Your browser doesn't have Flash, Silverlight or HTML5 support.</div>
  </body>
</html>
Posted by: Guest on May-05-2020
0

how to upload large video file in php

upload_max_filesize = 50M
post_max_size = 50M
max_input_time = 300
max_execution_time = 300
Posted by: Guest on May-05-2020
0

how to upload large video file in php

D:\http\test>composer require moxiecode/plupload
Using version ^3.1 for moxiecode/plupload
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing moxiecode/plupload (v3.1.2): Downloading (100%)
Writing lock file
Generating autoload files
Posted by: Guest on May-05-2020
0

how to upload large video file in php

<?php
// CHANGE THE UPLOAD LIMITS
ini_set('upload_max_filesize', '50M');
ini_set('post_max_size', '50M');
ini_set('max_input_time', 300);
ini_set('max_execution_time', 300);

// SET THE DESTINATION FOLDER
$source = $_FILES["file-upload"]["tmp_name"];
$destination = $_FILES["file-upload"]["name"];

// MOVE UPLOADED FILE TO DESTINATION
move_uploaded_file($source, $destination);
?>
Posted by: Guest on May-05-2020

Browse Popular Code Answers by Language