From 134e9c29cf3b0ab4e7476e8f26320c68592cd94c Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sat, 16 Apr 2022 10:47:32 +0800 Subject: [PATCH] add smallfileupload --- platform/Replit.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/Replit.php b/platform/Replit.php index a682197..a611805 100644 --- a/platform/Replit.php +++ b/platform/Replit.php @@ -355,3 +355,9 @@ function WaitFunction() { function changeAuthKey() { return message("Not need.", 'Change platform Auth token or key', 404); } + +function smallfileupload($drive, $path) { + if ($_FILES['file1']['error']) return output($_FILES['file1']['error'], 400); + if ($_FILES['file1']['size']>4*1024*1024) return output('File too large', 400); + return $drive->smallfileupload($path, $_FILES['file1']); +}