ng-file-upload icon indicating copy to clipboard operation
ng-file-upload copied to clipboard

data sent as application/json

Open DanRamGim opened this issue 7 years ago • 2 comments

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

DanRamGim avatar Jun 20 '17 17:06 DanRamGim

Set the content-type in the header section. Read the documentation and search for 'type'

JSONRice avatar Jun 20 '17 23:06 JSONRice

For anybody still using this ( *sadpanda* for legacy apps):

Upload.http({
  url: '/api/uploadImage',
  data: json,
  headers : {
    'Content-Type': 'application/json'
  },
});

gianpaj avatar Nov 06 '19 19:11 gianpaj