Class UploadReader

  • All Implemented Interfaces:
    com.github.elopteryx.upload.OnPartBegin, com.github.elopteryx.upload.OnPartEnd, MessageBodyReader<Object>

    @Consumes("multipart/form-data")
    public class UploadReader
    extends Object
    implements MessageBodyReader<Object>, com.github.elopteryx.upload.OnPartBegin, com.github.elopteryx.upload.OnPartEnd
    This class is a message body reader for multipart requests. It works like the blocking upload parser. It provides a default configuration which creates temporary files to store uploaded file data and stores each normal form field in a ByteArrayOutputStream instance. Other readers can extend this and implement the callback interfaces, which are the part begin and end callbacks. You must manually register this or its subclass to be used by the Jax-Rs runtime.

    The reader does not support the request callback, because that code can go into the controller method instead and the error callback, because there are exception mappers for that.

    The reader can inject the following parameters:

    Other parameters are not supported by the reader.