Class CompressedUpload

  • All Implemented Interfaces:
    IXUpload

    public final class CompressedUpload
    extends Object
    implements IXUpload
    An upload that replaces the original image with a compressed and/or scaled down version.
    Since:
    7.0.11
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • getContentType

        public String getContentType()
        Specified by:
        getContentType in interface IXUpload
        Returns:
        Content type of the replacement file.
      • getFileName

        public String getFileName()
        Specified by:
        getFileName in interface IXUpload
        Returns:
        The name of the replacement file
      • getFileNamePattern

        public String getFileNamePattern()
        Specified by:
        getFileNamePattern in interface IXUpload
        Returns:
        When not blank, this pattern will be used for the file name. Placeholders within the file name are replaced.
      • getInputStream

        public InputStream getInputStream()
                                   throws IOException
        Specified by:
        getInputStream in interface IXUpload
        Returns:
        The data of the replacement file. When null, the original file data is used.
        Throws:
        IOException - When the data of the replacement cannot be read.