From f2690a42235297c357bcd8abbf6e194db7b7bd57 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sun, 11 May 2025 16:52:46 +0500 Subject: feat: store original uploads --- public/emotes/upload.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'public/emotes/upload.php') diff --git a/public/emotes/upload.php b/public/emotes/upload.php index f890ec2..8b197a2 100644 --- a/public/emotes/upload.php +++ b/public/emotes/upload.php @@ -387,6 +387,11 @@ if ($is_manual) { abort_upload($path, $db, $id); exit; } + + if (EMOTE_STORE_ORIGINAL) { + $ext = get_file_extension($image["tmp_name"]) ?? ""; + move_uploaded_file($image["tmp_name"], "$path/original.$ext"); + } } if (ACCOUNT_LOG_ACTIONS) { -- cgit v1.2.3