ng-file-upload
ng-file-upload copied to clipboard
data sent as application/json
how can I achieve to send my file in ng-file-upload as a application/json to be able to receive the file in my REST server ?
Thank you in advance
Set the content-type in the header section. Read the documentation and search for 'type'
For anybody still using this ( *sadpanda* for legacy apps):
Upload.http({
url: '/api/uploadImage',
data: json,
headers : {
'Content-Type': 'application/json'
},
});