1

I'm having a lot of problem trying to upload a file in appengine using jersey 2.8

this is the method I use

    @POST
        @Consumes(MediaType.MULTIPART_FORM_DATA)
        @Produces("application/json")
        public StringT uploadFile(@FormDataParam("file") InputStream fileInputStream, @FormDataParam("file") FormDataContentDisposition fileDisposition){
...
return new StringT("ok");

    }

the exception I'm having is this

Uncaught exception from servlet
javax.servlet.UnavailableException: A MultiException has 3 exceptions.  They are:
1. java.lang.SecurityException: Unable to create temporary file
2. java.lang.IllegalStateException: Unable to perform operation: create on org.glassfish.jersey.media.multipart.internal.MultiPartReaderServerSide
3. java.lang.IllegalStateException: Unable to perform operation: create on org.glassfish.jersey.message.internal.MessageBodyFactory

I do not need to store the file, I just want to handle it

Anybody knows a solution?

il.bert
  • 232
  • 1
  • 3
  • 11
  • See the Stackoverflow question here: `http://stackoverflow.com/questions/6301973/multipart-file-upload-on-google-appengine-using-jersey-1-7` for a possible answer. I still can't get it to work though. – Floris Sep 11 '14 at 14:59
  • Ok, I solved it now - see my answer in the link of my comment above. – Floris Sep 15 '14 at 12:55
  • sorry for late answer, finally i changed my implementation, if you want post an answer and i will mark it as correct – il.bert May 08 '15 at 09:23

0 Answers0