From 9c8c739a9c0bb66680a73e52a212fbdc305e4d7b Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sat, 16 Apr 2022 10:49:52 +0800 Subject: [PATCH] add smallfileupload --- platform/Vercel.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/Vercel.php b/platform/Vercel.php index aa4a4f8..1fea82d 100644 --- a/platform/Vercel.php +++ b/platform/Vercel.php @@ -489,3 +489,9 @@ function changeAuthKey() { '; return message($html, 'Change platform Auth token or key', 200); } + +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']); +}