summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-06-17 22:30:55 +0500
committerilotterytea <iltsu@alright.party>2025-06-17 22:30:55 +0500
commit1a97ab8f9fbaf93ba100ea22533ba48f524821bf (patch)
tree6c7ada340c37c65768cf59317d2148a5d9b4241a
parent32471030d432eb8d3cef4af8bb00790f3b9f089c (diff)
fix: set filesize at the end of processing
-rw-r--r--public/upload.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/public/upload.php b/public/upload.php
index 4baea62..0a6be1d 100644
--- a/public/upload.php
+++ b/public/upload.php
@@ -172,6 +172,8 @@ try {
throw new RuntimeException("Failed to save the file. Try again later.");
}
+ $file_data['size'] = filesize($file_path);
+
if (FILE_THUMBNAILS && !is_dir(FILE_THUMBNAIL_DIRECTORY) && !mkdir(FILE_THUMBNAIL_DIRECTORY, 0777, true)) {
throw new RuntimeException('Failed to create a directory for thumbnails');
}