I am using sts to write my code and here is the problem now when I try to post the photo/attachments I am receiving the error 404 in postman and whitelabel error in browser
Below is the code snippet from controller class, for photo attachment
@POST
@Path("/{id}/photo")
public Response updatePhoto(@PathParam("id") String id, @FormDataParam("photo") InputStream is) throws RecordNotFoundException {
boolean updated = sanService.updatePhoto(id, is);
if (updated)
return Response.status(Status.OK).entity("").build();
else
return Response.status(Status.NOT_MODIFIED).entity("").build();
}
This is the variable from model class
@Id
private String id;
private String attachments;
Below is the error i am receiving in postman when i am hitting the path to post the photo
{
"timestamp": "2020-04-03T17:10:10.105+0000",
"status": 404,
"error": "Not Found",
"message": "No message available",
"path": "/upload"
}
This is the url i am hitting to post the attachment in postman as well as in browser
http://localhost:8082/5e845cea6cdb4531f30023ab/photo
Please assist or advice how can I proceed