Follow Rust and crates update

This commit is contained in:
Kitaiti Makoto
2021-11-28 08:06:29 +09:00
parent 9187e4dde9
commit ae3344f318
35 changed files with 208 additions and 160 deletions
+1 -6
View File
@@ -77,12 +77,7 @@ pub fn upload(
.map(|ext| format!(".{}", ext))
})
.unwrap_or_default();
let dest = format!(
"{}/{}{}",
CONFIG.media_directory,
GUID::rand().to_string(),
ext
);
let dest = format!("{}/{}{}", CONFIG.media_directory, GUID::rand(), ext);
match fields["file"][0].data {
SavedData::Bytes(ref bytes) => fs::write(&dest, bytes)