Skip to content

Commit d1af58a

Browse files
committed
Fixed TypeError: Cannot set property 'Content-Type' of undefined
1 parent b496cf6 commit d1af58a

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
@@ -64,6 +64,7 @@ angularFileUpload.service('$upload', ['$http', '$rootScope', '$timeout', functio
6464
return promise;
6565
};
6666
this.upload = function(config) {
67+
config.headers = config.headers || {};
6768
config.headers['Content-Type'] = undefined;
6869
config.transformRequest = config.transformRequest || $http.defaults.transformRequest;
6970
var formData = new FormData();

0 commit comments

Comments
 (0)