push_file_streaming

Function push_file_streaming 

Source
pub async fn push_file_streaming(
    state: &Arc<AppState>,
    id: &str,
    filename: &str,
    mime_type: &str,
    chunk_rx: Receiver<Result<Bytes, String>>,
    host: Option<String>,
    mode: &str,
) -> Result<(), String>
Expand description

Stream a file to juicehost by piping chunks from a channel straight into the HTTP body. Never keeps the whole file in memory. Close the sender to signal EOF.

Pass mode=“quic” to send over QUIC instead of regular TCP.