camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamalissimo <roman.janu...@gmail.com>
Subject Re: Upload file - How to pass InputStream to Camel's route
Date Tue, 26 Mar 2013 08:14:31 GMT
Hi Raul,

thanks for quick answer. This looks easy when you are using @GET, but I am
sending @POST request. If I am right, @POST sends data only in headers. I
was thinking about attachments, may be, but here it gets more confusing for
me :-)

Here is my REST implementation:
------------------------------------------------------------------------------------
	@POST
	@Consumes(MediaType.MULTIPART_FORM_DATA)
	@Path("/upload")
	@Produces(MediaType.APPLICATION_JSON)
	public Response uploadFile(
				@QueryParam("host") String host,
				@QueryParam("port") String port, 
				@QueryParam("user") String user,
				@QueryParam("password") String password,
				@Multipart(value="folderId") String folderId,
				@Multipart(value="filename") String filename,
				@Multipart(value="myfile") DataHandler myfile
			){}


Thanks

-Br, Roman



--
View this message in context: http://camel.465427.n5.nabble.com/Upload-file-How-to-pass-InputStream-to-Camel-s-route-tp5729752p5729829.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message