Uploading file using Jersey over RESTfull service and The resource configuration is not modifiable?

前端 未结 6 987
误落风尘
误落风尘 2020-12-13 04:15
@Path(\"file.upload\")
public class UploadFileService {
@POST
@Consumes(MediaType.MULTIPART_FORM_DATA)
public Response uploadFile(
        @FormDataParam(\"file\") I         


        
6条回答
  •  庸人自扰
    2020-12-13 05:02

    You can use @FormDataParam("file") equivalent of FormDataMultiPart if you want it using annotation.

    Used as given below sample code extract:

    public Response uploadFile( **@FormDataParam("file")** InputStream fileInputStream,
                 @FormDataParam("file") FormDataContentDisposition contentDispositionHeader) {
    

提交回复
热议问题