vendredi 14 août 2015

How to fix this bug on getting form data in restful web services of maven project?

    @POST
@Consumes(MediaType.MULTIPART_FORM_DATA)
public String upload( @FormParam("file") @PartType("application/octet-stream") InputStream data) 
//public String upload( @FormParam("file") @PartType("application/octet-stream") byte[] data) 
{

}

why length of data is zero??? of course, in upload form, form element's input type is 'file'... @FormDataParam instead of @FormParam, is not recognized... Is the reason repository setting???

Aucun commentaire:

Enregistrer un commentaire