Display info of uploaded files
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user