summaryrefslogtreecommitdiff
path: root/public/emotes/upload.php
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-05-11 16:52:46 +0500
committerilotterytea <iltsu@alright.party>2025-05-11 16:56:01 +0500
commitf2690a42235297c357bcd8abbf6e194db7b7bd57 (patch)
tree1b0a221cd89903ed901b1d28047a493fa4a1317c /public/emotes/upload.php
parent7d0b7ed296d35025e04e19dc2604c8feca72383e (diff)
feat: store original uploads
Diffstat (limited to 'public/emotes/upload.php')
-rw-r--r--public/emotes/upload.php5
1 files changed, 5 insertions, 0 deletions
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) {