File Handling

Amity SDK provides various classes and methods for easy handling of files.

Upload

AmityFileRepository class contains method which helps in uploading files. It supports uploading of Binary Data (i.e Data or NSData) as well as uploading file from the URL directly.

It is the responsibility of the developer to ensure that the file URL can be accessed by the SDK. This may require moving the file that you want to upload to some temporary location.

The upload: method also contains a progress block which can be used to determine the progress of the upload.

Upload File

SDK automatically tries do determine the file name based on the last component of file URL

When file upload is successful, you will receive an instance of AmityUploadInfo which contains information about the uploading file.

SDK does not handle caching of any files. Developer should handle caching themselves. We recommend using Android's DownloadManager.

Last updated