如何使用进度条快速上传大文件?

目前我正在使用socket.io上传video进度条。 这里是教程

http://net.tutsplus.com/tutorials/javascript-ajax/how-to-create-a-resumable-video-uploade-in-node-js/

但Internet Explorer不支持这种方法,但我真的需要在所有浏览器上传video。

我检查了快递文件。 由于express是基于node-formidable (有一个进度事件),所以我觉得有办法build立一个带有进度条的上传系统,对不对? 我只是不知道如何!

节点强大的IE启用的权利?

任何方式都可以build立一个file upload系统在纯espress.js与进度条?

可以使用xhr.upload进度事件完成。 它是从html5支持的。

例如: https : //github.com/zeMirco/express-upload-progress

在PHP的上传信息可以附加到会议,所以它与html4,也许有一个nodejs扩展,我也会谷歌它。

据此: 如何在node.js中使用express进行上传,通过file upload的方式有一个进度事件,所以你可以在会话中用实际进度数据设置一个variables,并从客户端用ajax读取。

这里是jsfiddle使用angular度js和ng-file-upload指令。

jsfiddle适用于图片和文件,但是要将video上传到POST服务器。

 //inject angular file upload directives and services. var app = angular.module('fileUpload', ['ngFileUpload']); app.controller('MyCtrl', ['$scope', 'Upload', '$timeout', function($scope, Upload, $timeout) { $scope.uploadFiles = function(file, errFiles) { $scope.f = file; $scope.errFile = errFiles && errFiles[0]; if (file) { file.upload = Upload.upload({ url: 'https://angular-file-upload-cors-srv.appspot.com/upload', data: { file: file } }); file.upload.then(function(response) { $timeout(function() { file.result = response.data; }); }, function(response) { if (response.status > 0) $scope.errorMsg = response.status + ': ' + response.data; }, function(evt) { file.progress = Math.min(100, parseInt(100.0 * evt.loaded / evt.total)); }); } } }]); 
 .thumb { width: 24px; height: 24px; float: none; position: relative; top: 7px; } form .progress { line-height: 15px; } .progress { display: inline-block; width: 100px; border: 3px groove #CCC; } .progress div { font-size: smaller; background: orange; width: 0; } 
 <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script> <script src="https://angular-file-upload.appspot.com/js/ng-file-upload-shim.js"></script> <script src="https://angular-file-upload.appspot.com/js/ng-file-upload.js"></script> <body ng-app="fileUpload" ng-controller="MyCtrl"> <h4>Upload on file select</h4> <button type="file" ngf-select="uploadFiles($file, $invalidFiles)" ngf-max-height="1000" ngf-max-size="100MB"> Select File</button> <br> <br> File: <div style="font:smaller">{{f.name}} {{errFile.name}} {{errFile.$error}} {{errFile.$errorParam}} <span class="progress" ng-show="f.progress >= 0"> <div style="width:{{f.progress}}%" ng-bind="f.progress + '%'"></div> </span> </div> {{errorMsg}} </body>