Set up packaging and distribution for the file service app #73
|
@ -68,7 +68,7 @@ pub async fn file(
|
|||
old_etags: Option<String>,
|
||||
) -> Result<Response<Vec<u8>>, Error> {
|
||||
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()
|
||||
.status(StatusCode::NOT_FOUND)
|
||||
.body(vec![]),
|
||||
|
|
Loading…
Reference in New Issue