Skip to content

Commit

Permalink
1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
danialfarid committed Dec 31, 2013
1 parent 7e41c3d commit d5a6ad6
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 11 deletions.
8 changes: 6 additions & 2 deletions angular-file-upload-html5-shim.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**!
* AngularJS file upload shim for angular XHR HTML5 browsers
* @author Danial <danial.farid@gmail.com>
* @version 1.2.0
* @version 1.2.1
*/
if (window.XMLHttpRequest) {
if (window.FormData) {
Expand All @@ -12,7 +12,11 @@ if (window.XMLHttpRequest) {
xhr.setRequestHeader = (function(orig) {
return function(header, value) {
if (header === '__setXHR_') {
value(xhr);
var val = value(xhr);
// fix for angular < 1.2.0
if (val instanceof Function) {
val(xhr);
}
} else {
orig.apply(xhr, arguments);
}
Expand Down
4 changes: 2 additions & 2 deletions angular-file-upload-html5-shim.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 11 additions & 3 deletions angular-file-upload-shim.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**!
* AngularJS file upload shim for HTML5 FormData
* @author Danial <danial.farid@gmail.com>
* @version 1.2.0
* @version 1.2.1
*/
(function() {

Expand All @@ -14,7 +14,11 @@ if (window.XMLHttpRequest) {
xhr.setRequestHeader = (function(orig) {
return function(header, value) {
if (header === '__setXHR_') {
value(xhr);
var val = value(xhr);
// fix for angular < 1.2.0
if (val instanceof Function) {
val(xhr);
}
} else {
orig.apply(xhr, arguments);
}
Expand Down Expand Up @@ -63,7 +67,11 @@ if (window.XMLHttpRequest) {
xhr.setRequestHeader = (function(orig) {
return function(header, value) {
if (header === '__setXHR_') {
value(xhr);
var val = value(xhr);
// fix for angular < 1.2.0
if (val instanceof Function) {
val(xhr);
}
} else {
orig.apply(xhr, arguments);
}
Expand Down
4 changes: 2 additions & 2 deletions angular-file-upload-shim.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion angular-file-upload.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**!
* AngularJS file upload/drop directive with http post and progress
* @author Danial <danial.farid@gmail.com>
* @version 1.2.0
* @version 1.2.1
*/
(function() {

Expand Down
2 changes: 1 addition & 1 deletion angular-file-upload.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d5a6ad6

Please sign in to comment.