在gae中使用jersey2.8上传文件

时间:2014-05-20 10:15:04

标签: java google-app-engine jersey

我尝试使用jersey 2.8在appengine上传文件时遇到很多问题

这是我使用的方法

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

    }

我遇到的例外是

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

我不需要存储文件,我只是想处理它

有人知道解决方案吗?

0 个答案:

没有答案