You can give AngularJS.ngUpload a try.
It's an HTML5-free solution that uses an invisible iFrame for file upload. Since it does not rely on HTML5, it works across browser!
Sample code:
{{uploadReport}}
Any html element that supports a click event can be used to submit a form marked with the ngUpload directive, only that such elements must be marked with the upload-submit css class (as the case with the input[type=submit] above.
The example below uses a styled div to submit the form.
{{uploadReport}}
You can make your /server/upload/handler spit a valid url, so that {{uploadReport}} can be used to set the src of an tag, like so:
and see the uploaded image appear immediately!
The ngController for the above examples is:
var UploadCtrl = function ($scope) {
$scope.callbackFunction = function(contentOfInvisibleFrame) {
$scope.uploadReport = contentOfInvisibleFrame;
}
}
The ngUpload directive can be registered with your AngularJS application module viz:
var mainApp = angular.module('MainApp', ["ngUpload", ...]);
and added to your document as:
AngularJS.ngUpload works in the context of a ngController; and such you can have as many uploaders as possible in a single ngController. For example:
Server response: {{uploadReport1}}
Server response: {{uploadReport2}}
to be served by:
var UploadCtrl = function ($scope) {
$scope.callbackFunction1 = function(contentOfInvisibleFrame) {
$scope.uploadReport1 = contentOfInvisibleFrame;
}
$scope.callbackFunction2 = function(contentOfInvisibleFrame) {
$scope.uploadReport2 = contentOfInvisibleFrame;
}
}
A NodeJS-based upload handler demo of this directive can be found at http://ng-upload.eu01.aws.af.cm.
An ASP.Net MVC and NodeJS sample codes can be found on the project website at github.com/twilson63/ngUpload/tree/master/examples
Hope this helps.