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")