Skip to content

Commit 42cf826

Browse files
committed
Merge pull request danialfarid#90 from madhurjain/master
Fixed TypeError: Cannot set property 'Content-Type' of undefined
2 parents e43cd4b + d1af58a commit 42cf826

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

dist/angular-file-upload.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ angularFileUpload.service('$upload', ['$http', '$rootScope', '$timeout', functio
6666
return promise;
6767
};
6868
this.upload = function(config) {
69+
config.headers = config.headers || {};
6970
config.headers['Content-Type'] = undefined;
7071
config.transformRequest = config.transformRequest || $http.defaults.transformRequest;
7172
var formData = new FormData();

0 commit comments

Comments
 (0)