users@jersey.java.net

[Jersey] Re: Question about multipart upload

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Thu, 4 Dec 2014 10:05:52 -0500

 I don't have a running example, but basically you need:

 @FormDataParam("foo") InputStream foo

 This example may help:

http://examples.javacodegeeks.com/enterprise-java/rest/jersey/jersey-file-upload-example/

-- Santiago

On Dec 4, 2014, at 9:54 AM, Rindt, Daniel <drindt_at_viselabs.com> wrote:

> 2014-12-04 15:35 GMT+01:00 Santiago Pericas-Geertsen
> <Santiago.PericasGeertsen_at_oracle.com>:
>
> Dear Santiago,
>
> thanks for your reply.
>
>> If you don't have the multipart running, there's Jersey sample for that (multipart-webapp). If you do have it running, what is the issue with just adding some @QueryParam's in your code?
>
> I am simply unsure what i have to do to receive images there. I have
> seen so many examples and tried so much. Can you please provide me an
> example? In my case i expect from the client
> one or more photos as upload. FormDataMultipart was helpful in the
> local environment but doesn't work in the real appengine. So i moved
> to Jersey 2. But there is no FormDataMultipart
> anymore.
>
> It would be really nice to provide such example how to obtain an
> InputStream of the uploaded Multipart element.
>
> Thank you very much.
> Daniel
>
>> -- Santiago
>>
>> On Dec 3, 2014, at 5:47 PM, Rindt, Daniel <drindt_at_viselabs.com> wrote:
>>
>>> Dear reader,
>>>
>>> i'm using jersey 2.13 including the multipart packages. The
>>> application is deployed to appengine and should receive multiple
>>> images. Alongside the images are posted few parameters (@QueryParam)
>>> not as multipart. I tried to do my homework and looked for example
>>> code also the examples from github but i wasn't successful.
>>> So my question is: can someone please point me to example code which do this?
>>>
>>> I am very thankful for all hints and suggestions.
>>>
>>> Kind Regards,
>>> --
>>> Daniel Rindt
>>> Viselabs e. K.
>>> mobile software solutions
>>> Berlin, Germany
>>>
>>> phone: +4930202368410
>>> fax: +4930202368411
>>>
>>> entered in the commercial register at the local court of Berlin under HRA 46662B
>>
>
>
>
> --
> Daniel Rindt
> Viselabs e. K.
> mobile software solutions
> Berlin, Germany
>
> phone: +4930202368410
> fax: +4930202368411
>
> entered in the commercial register at the local court of Berlin under HRA 46662B