From 9872093fb7080da3d84df8d2dbf7e19b62088ce0 Mon Sep 17 00:00:00 2001 From: Jukka Lampikoski Date: Sun, 8 Mar 2026 01:09:07 +0200 Subject: [PATCH] =?UTF-8?q?Nosta=20uploadraja=208=20MB=20=E2=86=92=2020=20?= =?UTF-8?q?MB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin.html | 2 +- script.js | 2 +- upload.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin.html b/admin.html index d1f59f6..ed403b3 100644 --- a/admin.html +++ b/admin.html @@ -504,7 +504,7 @@ prev.style.display = 'block'; lbl.classList.add('has-image'); } catch (e) { - showToast('⚠️ Kuvan lataus epäonnistui. Tuetut muodot: JPG, PNG, GIF, WebP.'); + showToast('⚠️ Kuvan lataus epäonnistui. Tuetut muodot: JPG, PNG, GIF, WebP (max 20 MB).'); } finally { lbl.style.opacity = ''; } diff --git a/script.js b/script.js index 0699293..fcfe8c1 100644 --- a/script.js +++ b/script.js @@ -440,7 +440,7 @@ async function uploadImg(input, hiddenId, previewId, labelId) { prev.style.display = 'block'; lbl.classList.add('has-image'); } catch (e) { - alert('Kuvan lataus epäonnistui. Tuetut muodot: JPG, PNG, GIF, WebP (max 8 MB).'); + alert('Kuvan lataus epäonnistui. Tuetut muodot: JPG, PNG, GIF, WebP (max 20 MB).'); } finally { lbl.style.opacity = ''; } diff --git a/upload.php b/upload.php index 678c387..c97cb86 100644 --- a/upload.php +++ b/upload.php @@ -5,7 +5,7 @@ */ $allowed_mime = ['image/jpeg', 'image/png', 'image/gif', 'image/webp']; -$max_bytes = 8 * 1024 * 1024; // 8 Mt +$max_bytes = 20 * 1024 * 1024; // 20 Mt header('Content-Type: application/json');