Hi Roman,
I have used the following in some of the code I have in JAX-RS:
@FormDataParam("file") InputStream uploadedInputStream,
@FormDataParam("file") FormDataContentDisposition fileDetail
you can then use fileDetail.getFileName();
Chris
On Wed, Jul 10, 2013 at 10:11 AM, jamalissimo <[email protected]>wrote:
> Hello guys,
>
> I am working on file upload via CXF and I have little problem.
> Here is the REST part:
>
> @POST
> @Consumes(MediaType.MULTIPART_FORM_DATA)
> @Path("/upload")
> @Produces(MediaType.APPLICATION_JSON)
> public Response uploadFile(
> @Multipart("document") byte[] document,
> @Multipart("product") String product,
> @Multipart("uploader") String uploader,
> @Multipart("folderId") String folderId)
> throws IOException {
>
> return null;
> }
>
> Problem is, that I need somehow to get the name of the file, but I am not
> sure if it is possible from byte[].
> I am using Karaf 2.3.1
>
> Thanks for help
>
> -Roman
>
>
>
> -----
> -Br, Roman
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Multipart-file-upload-tp5730547.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
--
Chris Riley, Partner
HKM Consulting LLC
(w) hkmconsultingllc.com
(o) 774.553.5314
(m) 508.273.3102
(f) 774.553.5316