summaryrefslogtreecommitdiff
path: root/public/upload.php
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-03-22 04:12:24 +0500
committerilotterytea <iltsu@alright.party>2025-03-22 04:12:24 +0500
commitedfdd86ceb66211edb17f1a57930887beab01f32 (patch)
tree7702f723abb9c592d57443e7137fffa28f5748ea /public/upload.php
parentf61ad2eb297bee7603616137fb5ba1880f3b872c (diff)
feat: show uploaded files
Diffstat (limited to 'public/upload.php')
-rw-r--r--public/upload.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/public/upload.php b/public/upload.php
index d73a975..5c4e3cb 100644
--- a/public/upload.php
+++ b/public/upload.php
@@ -54,8 +54,9 @@ try {
json_response([
'id' => $file_id,
- 'ext' => $file_ext,
- 'mime' => FILE_ACCEPTED_MIME_TYPES[$file_ext]
+ 'extension' => $file_ext,
+ 'mime' => FILE_ACCEPTED_MIME_TYPES[$file_ext],
+ 'size' => $file['size']
], null, 201);
} catch (RuntimeException $e) {
json_response(null, $e->getMessage(), 400);