From 1a97ab8f9fbaf93ba100ea22533ba48f524821bf Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Tue, 17 Jun 2025 22:30:55 +0500 Subject: fix: set filesize at the end of processing --- public/upload.php | 2 ++ 1 file changed, 2 insertions(+) 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'); } -- cgit v1.2.3