All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.io.github.jan.supabase.storage.DownloadOptionBuilder.kt Maven / Gradle / Ivy

There is a newer version: 3.0.2
Show newest version
package io.github.jan.supabase.storage

import io.github.jan.supabase.network.HttpRequestOverride

/**
 * Builder for downloading files with additional options
 */
class DownloadOptionBuilder(
    internal var transform: ImageTransformation.() -> Unit = {},
    internal val httpRequestOverrides: MutableList = mutableListOf()
) {

    /**
     * Transforms the image before downloading
     * @param transform The transformation to apply
     */
    fun transform(transform: ImageTransformation.() -> Unit) {
        this.transform = transform
    }

    /**
     * Overrides the HTTP request
     * @param override The override to apply
     */
    fun httpOverride(override: HttpRequestOverride) {
        httpRequestOverrides.add(override)
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy