forked from neri/datatrash
don't send content-disposition header for index.html
This commit is contained in:
parent
78ef78f342
commit
593f93d7d8
|
@ -24,10 +24,11 @@ const ID_CHARS: &[char] = &[
|
||||||
];
|
];
|
||||||
|
|
||||||
pub async fn index(config: web::Data<Config>) -> Result<NamedFile, Error> {
|
pub async fn index(config: web::Data<Config>) -> Result<NamedFile, Error> {
|
||||||
NamedFile::open(config.static_dir.join("index.html")).map_err(|file_err| {
|
let file = NamedFile::open(config.static_dir.join("index.html")).map_err(|file_err| {
|
||||||
log::error!("index.html could not be read {:?}", file_err);
|
log::error!("index.html could not be read {:?}", file_err);
|
||||||
error::ErrorInternalServerError("this file should be here but could not be found")
|
error::ErrorInternalServerError("this file should be here but could not be found")
|
||||||
})
|
})?;
|
||||||
|
Ok(file.disable_content_disposition())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn upload(
|
pub async fn upload(
|
||||||
|
|
Loading…
Reference in New Issue