Serve the original file with the main path instead of the thumbnail
This commit is contained in:
parent
1d89254413
commit
d4a5e0f55d
|
@ -68,7 +68,7 @@ pub async fn file(
|
||||||
old_etags: Option<String>,
|
old_etags: Option<String>,
|
||||||
) -> Result<Response<Vec<u8>>, Error> {
|
) -> Result<Response<Vec<u8>>, Error> {
|
||||||
match app.get_file(&FileId::from(id)).await {
|
match app.get_file(&FileId::from(id)).await {
|
||||||
Ok(file) => serve_file(file.info.clone(), || file.thumbnail(), old_etags),
|
Ok(file) => serve_file(file.info.clone(), || file.content(), old_etags),
|
||||||
Err(_err) => Response::builder()
|
Err(_err) => Response::builder()
|
||||||
.status(StatusCode::NOT_FOUND)
|
.status(StatusCode::NOT_FOUND)
|
||||||
.body(vec![]),
|
.body(vec![]),
|
||||||
|
|
Loading…
Reference in New Issue