This commit is contained in:
Bevan Hunt 2019-12-16 06:48:43 -08:00
parent c219004fac
commit b3ac6eaf49
3 changed files with 2 additions and 3 deletions

View File

@ -25,10 +25,9 @@ async fn download(data: web::Data<MyData>, broad: web::Data<std::sync::Mutex<Bro
broadcast(counter, broad).await;
let f = web::block(|| std::fs::File::create("test.jpg")).await.unwrap();
let f = web::block(|| std::fs::File::create("test.pdf")).await.unwrap();
// BUG: this should return content-disposition attachment not inline
NamedFile::from_file(f, "test.jpg")
NamedFile::from_file(f, "test.pdf")
}
async fn index() -> impl Responder {

View File

BIN
test.pdf Normal file

Binary file not shown.