Display info of uploaded files

This commit is contained in:
2025-04-28 21:38:27 +02:00
parent 3ae229a275
commit c6851bb50d
7 changed files with 78 additions and 3 deletions

View File

@ -39,6 +39,11 @@ pub async fn upload(auth: AuthExtractor, file: FileExtractor) -> HttpResult {
Ok(HttpResponse::Ok().json(file))
}
/// Get information about a file
pub async fn get_info(file_extractor: FileIdExtractor) -> HttpResult {
Ok(HttpResponse::Ok().json(file_extractor.as_ref()))
}
/// Download an uploaded file
pub async fn download(req: HttpRequest, file_extractor: FileIdExtractor) -> HttpResult {
serve_file(req, file_extractor.as_ref()).await