Interface FileUploader

  • All Implemented Interfaces:

    
    public interface FileUploader
    
                        

    The FileUploader is responsible for sending and deleting files from given channel

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • sendFile

         abstract Result<UploadedFile> sendFile(String channelType, String channelId, String userId, File file, ProgressCallback callback)

        Uploads a file for the given channel. Progress can be accessed via callback.

        Returns:

        The Result object containing an instance of UploadedFile in the case of a successful upload or an exception if the upload had failed.

      • sendFile

         abstract Result<UploadedFile> sendFile(String channelType, String channelId, String userId, File file)

        Uploads a file for the given channel.

        Returns:

        The Result object containing an instance of UploadedFile in the case of a successful upload or an exception if the upload had failed.

      • sendImage

         abstract Result<UploadedFile> sendImage(String channelType, String channelId, String userId, File file, ProgressCallback callback)

        Uploads an image for the given channel. Progress can be accessed via callback.

        Returns:

        The Result object containing an instance of UploadedFile in the case of a successful upload or an exception if the upload had failed.

      • sendImage

         abstract Result<UploadedFile> sendImage(String channelType, String channelId, String userId, File file)

        Uploads an image for the given channel.

        Returns:

        The Result object containing an instance of UploadedFile in the case of a successful upload or an exception if the upload had failed.

      • deleteFile

         abstract Result<Unit> deleteFile(String channelType, String channelId, String userId, String url)

        Deletes the file represented by url from the given channel.

        Returns:

        The empty Result object, or Result object with exception if the operation failed.

      • deleteImage

         abstract Result<Unit> deleteImage(String channelType, String channelId, String userId, String url)

        Deletes the image represented by url from the given channel.

        Returns:

        The empty Result object, or Result object with exception if the operation failed.