0

I am self teaching myself how to write rest services. I insert the input stream into my database and now I want to use the image a user might upload. I would like to give the image to its own link... How do I go about doing that with jersey? I cant not find a tutorial online.. I'm stumped on how to go about this.

Here is how i'm getting the image.. it post to my database with a few functions I did not include.

@Path("/submitinfo" )
public class SubmitName {   

    @POST
    @Produces(MediaType.APPLICATION_XML)
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    public String post(@FormDataParam("file") InputStream uploadedInputStream, @FormParam("first") String name) {
        Connection con = connection();

        postName(con, name);
        postPhoto(con, uploadedInputStream);
        return name;            
    }
}
Dror Bereznitsky
  • 20,048
  • 3
  • 48
  • 57
NightSkyCode
  • 1,141
  • 2
  • 16
  • 33

0 Answers0