2
Seems Plupload是一個很棒的工具。但我在這裏陷入了一個簡單的問題。我已經設置multipart = false(我不想以塊的形式發送數據),但是,我想顯示上傳的百分比。但是它沒有顯示%上傳,只顯示上傳結束時的100%。這是我的代碼。multipart = true和顯示上傳百分比之間的Plupload連接
$(function() { var pluploader = new plupload.Uploader({ runtimes : 'flash', //flash,gears,flash,silverlight,browserplus,html5 browse_button : 'img_video_upload', container : 'video_upload_container', max_file_size : '3gb', //chunk_size : '100kb', multipart : false, multiple_queues : false, multi_selection: false, url : 'url('*/*/videoupload')?>', flash_swf_url : '/public/js/plupload/js/plupload.flash.swf', filters : [ {title : "Video file", extensions : "flv"} ] }); pluploader.init(); pluploader.bind('FilesAdded', function(up, files) { $('#panelWrapError').remove(); pluploader.start(); //start file upload }); pluploader.bind('UploadProgress', function(up, file) { $('#upload_progress').html('Progress: ' + file.name + ' ' + file.percent + '% Uploaded ' + "
"); }); pluploader.bind('FileUploaded', function(up, file, ret) { var response = eval('(' + ret.response + ')'); //hide upload progress div //$('#upload_progress').hide(); if(response.success){ $('#uploadresultwithtime').html('Your video was successfully uploaded. Please view preview.' + '
Video length: ' + response.duration + ' seconds' + '
Video size: ' + response.size + ' kb' ); } if(response.error){ $('#uploadresultwithtime').html(response.message); } }); pluploader.bind('Error', function(up, err) { $('#panelWrap').prepend('
- ' + err.message +'
奇怪!沒有人對我的問題感興趣? – rbncha