From 594ca9d253b21ec2c7198f51351fbd82e4941744 Mon Sep 17 00:00:00 2001 From: neri Date: Tue, 14 Jul 2020 16:03:34 +0200 Subject: [PATCH] remove content disposition from index.html --- src/file_kind.rs | 1 - src/main.rs | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/file_kind.rs b/src/file_kind.rs index 51a796e..4654c32 100644 --- a/src/file_kind.rs +++ b/src/file_kind.rs @@ -25,4 +25,3 @@ impl FromStr for FileKind { } } } - diff --git a/src/main.rs b/src/main.rs index 1e9b36f..1a1d107 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,7 +28,9 @@ const UPLOAD_HTML: &str = include_str!("../template/upload.html"); const VIEW_HTML: &str = include_str!("../template/view.html"); async fn index() -> Result { - Ok(NamedFile::open("static/index.html").map_err(|_| error::ErrorNotFound(""))?) + Ok(NamedFile::open("static/index.html") + .map_err(|_| error::ErrorNotFound(""))? + .disable_content_disposition()) } async fn upload(