Spring Rest Controller with Byte Array file
I am trying to send a byte array of a file content from angular to the rest api. But I am getting Http 403 forbidden. I don't have any security enabled. I am not sure what I am doing wrong. I tried couple of different MIME types. The below is the http post from angular js and the $scope.encoded_file has the file in byte array. $http({ method:'POST', url:'http://localhost:9200/docupload', data:{'content':$scope.encoded_file,'name':'test','type':'pdf'}, headers:{'Content-Type':'application/octet-stream'} }).success(function(){}); }; DocUploadService @RestController public class DocUploadService
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.