diff options
| author | Santo Cariotti <santo@dcariotti.me> | 2022-09-13 13:07:05 +0000 |
|---|---|---|
| committer | Santo Cariotti <santo@dcariotti.me> | 2022-09-13 13:07:05 +0000 |
| commit | 987e5d92ea9043b588cb7887861bb05a3a0695c4 (patch) | |
| tree | 86f350ee2bbbe0ce2f1b9c1fc6aeb10b05a5f5c9 | |
| parent | 249c2da5ee39e8f4982184fa322e3d7234c2120c (diff) | |
Generic fs import
| -rw-r--r-- | src/files.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/files.rs b/src/files.rs index c4b2669..0bc531d 100644 --- a/src/files.rs +++ b/src/files.rs @@ -4,7 +4,7 @@ use axum::{ extract::{Multipart, Path}, http::header::{HeaderMap, HeaderName, HeaderValue}, }; -use std::fs::read; +use std::fs; use rand::random; @@ -76,5 +76,5 @@ pub async fn show_uploads(Path(id): Path<String>) -> (HeaderMap, Vec<u8>) { ); } let file_name = format!("{}/{}", CONFIG.save_file_base_path, id); - (headers, read(&file_name).unwrap()) + (headers, fs::read(&file_name).unwrap()) } |
