我正在尝试使用plupload上传视频,但是我得到的是奇怪的文件而不是视频文件

时间:2018-10-20 02:09:03

标签: javascript php jquery plupload

这是我在javascript中无法使用的代码;不能上传视频文件,它对于图像效果很好。尝试上传视频文件后,有一张文件的图片

enter image description here

 var uploader = new plupload.Uploader({
            // General settings
            runtimes : 'silverlight,html4',
            browse_button : 'pickfiles', // you can pass in id...
            url : 'upload.php',
            chunk_size : '1mb',
            unique_names : true,
     
            // Resize images on client-side if we can
            resize : { width : 320, height : 240, quality : 90 },
            
            filters : {
                max_file_size : '10mb',

                // Specify what files to browse for
                
                mime_types : "image/*,application/zip,video/mp4"
            },
     
            flash_swf_url : '../js/Moxie.swf',
            silverlight_xap_url : '../js/Moxie.xap',
             
            // PreInit events, bound before the internal events
            preinit : {
                Init: function(up, info) {
                    log('[Init]', 'Info:', info, 'Features:', up.features);
                },
 
            UploadFile: function(up, file) {
                log('[UploadFile]', file);
 
                // You can override settings before the file is uploaded
                // up.setOption('url', 'upload.php?id=' + file.id);
                // up.setOption('multipart_params', {param1 : 'value1', param2 : 'value2'});
            }
        },

如果您有任何想法,请写下您的想法。

预先感谢

0 个答案:

没有答案