hi guys,
I am trying to send request post using $resource for multipart/form-data,
but it is not working. Here my factory:
angular.module('webappApp')
.factory('produtoAdminService', function ($resource) {
return $resource('../api/adminproduto/:upload',{upload:"@upload"},{
update:{
method:'PUT'
},
upload:{
method:'POST',params:{
upload:"upload"
},headers:{
'Content-Type': 'multipart/form-data'
}
}
});
});
I am seeing 415. Why?
My back-end is like this:
@POST
@Path("/{upload}")
@Consumes(MediaType.MULTIPART_FORM_DATA)
public Response uploadFile(@FormDataParam("file")InputStream
uploadInputStream, @FormDataParam("file")FormDataContentDisposition
fileDetail) {
}
could someone help me, please?
thanks.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.