summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-09-13 13:07:05 +0000
committerSanto Cariotti <santo@dcariotti.me>2022-09-13 13:07:05 +0000
commit987e5d92ea9043b588cb7887861bb05a3a0695c4 (patch)
tree86f350ee2bbbe0ce2f1b9c1fc6aeb10b05a5f5c9 /src
parent249c2da5ee39e8f4982184fa322e3d7234c2120c (diff)
Generic fs import
Diffstat (limited to 'src')
-rw-r--r--src/files.rs4
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())
}