From 82fb724770a1e4521003651f1c4106adf7bcdbd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Sun, 25 May 2025 05:21:35 +0300 Subject: [PATCH] fix avatars --- apps/users.lua | 2 +- util.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/users.lua b/apps/users.lua index 14afaff..ce35cd4 100644 --- a/apps/users.lua +++ b/apps/users.lua @@ -179,7 +179,7 @@ app:post("user_set_avatar", "/:username/set_avatar", function(self) local time = os.time() local filename = "u" .. target_user.id .. "d" .. time .. ".webp" local proxied_filename = "/avatars/" .. filename - local save_path = "static" .. proxied_filename + local save_path = "data/static" .. proxied_filename local res = util.validate_and_create_image(file.content, save_path) if not res then util.inject_warn_infobox(self, "Something went wrong. Try again later.") diff --git a/util.lua b/util.lua index 723652a..64a9a81 100644 --- a/util.lua +++ b/util.lua @@ -203,7 +203,7 @@ function util.destroy_avatar(avatar_id) return end - local file_path = "static" .. avatar.file_path + local file_path = "data/static" .. avatar.file_path local f = io.open(file_path, "r") if not f then print("can't open avatar file")