Upload Source
class UploadSource(val fileName: String, val contentLength: Long, val contentType: String = guessContentType(fileName), val sourceId: String = fileName, val versionTag: String = "", rangeOpener: (Long) -> InputStream? = null, opener: () -> InputStream)
Reopenable media input used by signed uploads.
The SDK intentionally does not depend on android.net.Uri. Keeping the Android framework out of the core artifact makes it JVM-testable, while an app can still stream a content URI with: UploadSource(name, size, mime, uri.toString()) { resolver.openInputStream(uri)!! }.
Constructors
Link copied to clipboard
constructor(fileName: String, contentLength: Long, contentType: String = guessContentType(fileName), sourceId: String = fileName, versionTag: String = "", rangeOpener: (Long) -> InputStream? = null, opener: () -> InputStream)