From edfdd86ceb66211edb17f1a57930887beab01f32 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sat, 22 Mar 2025 04:12:24 +0500 Subject: feat: show uploaded files --- public/index.php | 69 ++++++++++++++++++++++++++++++++++++++++++++++++- public/static/style.css | 12 +++++++++ public/upload.php | 5 ++-- 3 files changed, 83 insertions(+), 3 deletions(-) diff --git a/public/index.php b/public/index.php index 36e50c8..4a1267c 100644 --- a/public/index.php +++ b/public/index.php @@ -34,10 +34,20 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/../lib/partials.php'; + + \ No newline at end of file diff --git a/public/static/style.css b/public/static/style.css index 0659b99..7671a92 100644 --- a/public/static/style.css +++ b/public/static/style.css @@ -91,6 +91,14 @@ button[type=submit]:hover { flex-grow: 1; } +.grid { + display: grid; +} + +.grid-3 { + grid-template-columns: auto auto auto; +} + .justify-center { justify-content: center; } @@ -105,4 +113,8 @@ button[type=submit]:hover { .gap-8 { gap: 8px; +} + +.gap-4 { + gap: 4px; } \ No newline at end of file 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); -- cgit v1.2.3