downloadFile

abstract suspend fun downloadFile(url: String, headers: Map<String, String>? = null, body: Any?, httpMethod: HttpMethod, targetFileName: String, mimeType: String? = null, onProgress: suspend (Float) -> Unit = {}, onDownloadFinished: suspend () -> Unit = {}, onDownloadFailure: suspend (Throwable) -> Unit = {}): Result<Unit>

Downloads a file into the device's public/general storage (system Downloads location). Behavior is platform-specific — see dev.catbit.mosaic.core.data.schemas.event.events.networking.DownloadFileEventSchema.