DioxusLabs/dioxus · error
FileStream::into_request is only implemented for web targets
Error message
FileStream::into_request is only implemented for web targets
What it means
`FileStream::into_request` is only implemented for web (wasm32) targets; on any other platform it hits this compile-time-style guard. It fires when server file-streaming upload/download code is compiled into a non-web client build, meaning the caller must gate this API behind a web target.
Solutions
- FileStream::into_request only exists on web targets. Gate this code to wasm32 web or use another payload type.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/fullstack/src/payloads/files.rs:196 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23).
Data as JSON: /api/errors/37a56c169ff2fb55.
Report an issue: GitHub.
Appendix: source
Thrown at packages/fullstack/src/payloads/files.rs:196
if let Some(length) = content_length {
builder = builder.header("Content-Length", length)?;
}
if let Ok(filename) = filename {
builder = builder.header(
"Content-Disposition",
format!("attachment; filename=\"{}\"", filename),
)?;
}
return builder
.header("Content-Type", content_type)?
.send_body_stream(stream)
.await;
}
unimplemented!("FileStream::into_request is only implemented for web targets");
}
}
}
impl<S> FromRequest<S> for FileStream {
type Rejection = ServerFnError;
fn from_request(
req: Request,
_: &S,
) -> impl Future<Output = Result<Self, Self::Rejection>> + Send {
async move {
tracing::info!("Extracting FileUpload from request: {:?}", req);
let disposition = req.headers().get("Content-Disposition");
let filename = match disposition.map(|s| s.to_str()) {
Some(Ok(dis)) => {
let content = content_disposition::parse_content_disposition(dis);View on GitHub (pinned to 24f6a829df)