Android
Library that encapsulates remote storage operations to upload/download files
Getting Started
- Example
- Installing
- Readme
- Changelog
Uploading a file:
HumaObjectStorageManager.getInstance().uploadFile(
filepath, // file path
uploadProgress, // MutableLiveData<Int>, will consume 0-100 progress percentage values
{ s3Object -> /*file uploaded successfully*/ },
{ error -> /*failed to upload the file*/ }
)
Getting file download url:
HumaObjectStorageManager.getInstance().getDownloadUrl(
s3ObjectKey,
s3ObjectBucket,
{ url -> /*download url is ready*/ },
{ error -> /*failed to get download url*/ }
)
- Add the dependency in your local build.gradle file:
implementation("com.huma.sdk:object-storage:<latest-version>")
- Initialize
HumaUtilsManager
andHumaObjectStoreManager
in your Application class:
HumaUtilsManager.init(/*..*/)
HumaObjectStorageManager.init(/*..*/)
Object Storage module encapsulates remote storage operations to upload/download files, corresponding functions are present in HumaObjectStorageManager class.
Documentation
Dependencies
[0.1.29]
- #9 Object Storage module and its sample