This commit is contained in:
SadlyNotSappho 2024-02-20 11:57:52 -08:00
parent 723736f900
commit a5417649b1
1 changed files with 2 additions and 1 deletions

View File

@ -243,7 +243,8 @@ impl Image {
pub async fn create(db: &mut Connection<Db>, mut image: TempFile<'_>, user: User) -> Status<String> {
let uuid = uuid::Uuid::new_v4().to_string();
// this is bad. see any of maia arson crimew's articles as to why.
// TODO: implement checks to see if it's a png
// not doing this is bad. see any of maia arson crimew's articles as to why.
image.persist_to(format!("/images/{uuid}.png")).await.unwrap();
match db