Skip to main content

Installation

  1. Add InsForge dependencies to your project
build.gradle.kts:
  1. Initialize InsForge SDK
  1. Enable Logging (Optional)
For debugging, you can configure the SDK log level:
Use NONE or ERROR in production to avoid exposing sensitive data in logs.

Android Initialization

  1. Add Chrome Custom Tabs dependency to your build.gradle.kts:
  1. Initialize InsForge SDK (With Chrome Custom Tabs and Session Storage)
  1. Use Jetpack DataStore for Session Storage (Optional)

from()

Get a bucket instance for file operations.

Example


upload()

Upload a file with a specific path/key.

Parameters

  • path (String) - File path/key in the bucket
  • data (ByteArray) - File content as bytes
  • options (DSL block, optional) - Upload options

UploadOptions

Example

Upload from Android Uri

Developers can use the following function to upload files from an Android Uri:

uploadWithAutoKey()

Upload a file with auto-generated unique key.

Parameters

  • filename (String) - Original filename (used for extension detection)
  • data (ByteArray) - File content as bytes
  • options (DSL block, optional) - Upload options

Example


download()

Download a file as ByteArray.

Example


delete()

Delete a file from storage.

Example


createSignedUrl()

Create a signed URL for temporary access to a file.

Parameters

  • path (String) - File path in the bucket
  • expiresIn (Int) - Expiration time in seconds

Example


getDownloadUrl()

Get a download URL for a file.

Example


list()

List files in a bucket with optional filtering.

BucketListFilter Options

Example


Bucket Management

listBuckets()

List all storage buckets.

createBucket()

Create a new storage bucket.

updateBucket()

Update bucket settings.

deleteBucket()

Delete a storage bucket.

Advanced Upload

getUploadStrategy()

Get upload strategy for large files or resumable uploads.

confirmUpload()

Confirm a completed upload.