pub fn make_authorized_streamable(
    stream: UnboundedReceiverStream<Result<AuthorizedResponse<Bytes>, ControllerError>>
) -> impl Stream<Item = Result<Bytes, ControllerError>>
Expand description

Without this one, actix cannot stream our authorized streams as responses

HttpResponse::Ok()
    .append_header((
        "Content-Disposition",
        format!(
            "attachment; filename=\"Exam: {} - Submissions {}.csv\"",
            exam.name,
            Utc::now().format("%Y-%m-%d")
        ),
    ))
    .streaming(make_authorized_streamable(UnboundedReceiverStream::new(
        receiver,
    ))),