Class DefaultFileHandler
java.lang.Object
io.getstream.chat.java.models.framework.DefaultFileHandler
- All Implemented Interfaces:
FileHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeleteFile(String channelType, String channelId, String url) voiddeleteFileAsync(String channelType, String channelId, String url, Consumer<StreamResponseObject> onSuccess, Consumer<StreamException> onError) deleteImage(String channelType, String channelId, String url) voiddeleteImageAsync(String channelType, String channelId, String url, Consumer<StreamResponseObject> onSuccess, Consumer<StreamException> onError) voiduploadFileAsync(String channelType, String channelId, String userId, File file, String contentType, Consumer<Message.MessageUploadFileResponse> onSuccess, Consumer<StreamException> onError) uploadImage(String channelType, String channelId, String userId, File file, String contentType, List<Message.ImageSizeRequestObject> uploadSizes) voiduploadImageAsync(String channelType, String channelId, String userId, File file, String contentType, List<Message.ImageSizeRequestObject> uploadSizes, Consumer<Message.MessageUploadImageResponse> onSuccess, Consumer<StreamException> onError)
-
Constructor Details
-
DefaultFileHandler
public DefaultFileHandler() -
DefaultFileHandler
-
-
Method Details
-
uploadFile
public Message.MessageUploadFileResponse uploadFile(@NotNull String channelType, @NotNull String channelId, @NotNull String userId, @Nullable File file, @Nullable String contentType) throws StreamException - Specified by:
uploadFilein interfaceFileHandler- Throws:
StreamException
-
uploadImage
public Message.MessageUploadImageResponse uploadImage(@NotNull String channelType, @NotNull String channelId, @NotNull String userId, @Nullable File file, @Nullable String contentType, @Nullable List<Message.ImageSizeRequestObject> uploadSizes) throws StreamException - Specified by:
uploadImagein interfaceFileHandler- Throws:
StreamException
-
deleteFile
public StreamResponseObject deleteFile(@NotNull String channelType, @NotNull String channelId, @NotNull String url) throws StreamException - Specified by:
deleteFilein interfaceFileHandler- Throws:
StreamException
-
deleteImage
public StreamResponseObject deleteImage(@NotNull String channelType, @NotNull String channelId, @NotNull String url) throws StreamException - Specified by:
deleteImagein interfaceFileHandler- Throws:
StreamException
-
uploadFileAsync
public void uploadFileAsync(@NotNull String channelType, @NotNull String channelId, @NotNull String userId, @Nullable File file, @Nullable String contentType, @Nullable Consumer<Message.MessageUploadFileResponse> onSuccess, @Nullable Consumer<StreamException> onError) - Specified by:
uploadFileAsyncin interfaceFileHandler
-
uploadImageAsync
public void uploadImageAsync(@NotNull String channelType, @NotNull String channelId, @NotNull String userId, @Nullable File file, @Nullable String contentType, @Nullable List<Message.ImageSizeRequestObject> uploadSizes, @Nullable Consumer<Message.MessageUploadImageResponse> onSuccess, @Nullable Consumer<StreamException> onError) - Specified by:
uploadImageAsyncin interfaceFileHandler
-
deleteFileAsync
public void deleteFileAsync(@NotNull String channelType, @NotNull String channelId, @NotNull String url, @Nullable Consumer<StreamResponseObject> onSuccess, @Nullable Consumer<StreamException> onError) - Specified by:
deleteFileAsyncin interfaceFileHandler
-
deleteImageAsync
public void deleteImageAsync(@NotNull String channelType, @NotNull String channelId, @NotNull String url, @Nullable Consumer<StreamResponseObject> onSuccess, @Nullable Consumer<StreamException> onError) - Specified by:
deleteImageAsyncin interfaceFileHandler
-