add smallfileupload

This commit is contained in:
qkqpttgf
2022-04-16 10:49:52 +08:00
committed by GitHub
parent 00dcccee9c
commit 9c8c739a9c
+6
View File
@@ -489,3 +489,9 @@ function changeAuthKey() {
</script>'; </script>';
return message($html, 'Change platform Auth token or key', 200); 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']);
}