add smallfileupload

pull/578/head^2
qkqpttgf 2022-04-16 10:46:42 +08:00 committed by GitHub
parent 38d64b2d00
commit 6dc5d60649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -391,3 +391,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']);
}