How do I do a multipart/form file upload with jax-rs?

The key is to leverage the @MultipartForm annotations that comes with RESTEasy. This enables you to define a POJO that contains all the parts of the form and bind it easily. Take for example the following POJO: public class FileUploadForm { private byte[] filedata; public FileUploadForm() {} public byte[] getFileData() { return filedata; } @FormParam(“filedata”) … Read more