我需要添加头部的访问令牌。
$scope.dropzoneConfig = {
'options': { // passed into the Dropzone constructor
'url': 'SOME API URL' + $scope.SOME_ID
},
'eventHandlers': {
'sending': function (file, xhr, formData) {
},
'success': function (file, response) {
}
}};
我的请求头访问令牌是
{ headers: { 'Authorization': 'Bearer ' + $scope.access_token } }
我需要将此添加到我正在尝试调用的URL或API中。