Add upload backend

This commit is contained in:
2024-03-01 22:14:20 +01:00
parent 0c2cb115bf
commit 4a2712af3c
2 changed files with 194 additions and 0 deletions

14
endpoints/upload.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
require_once "lib/upload.php";
function endpoint($endpoint_data): array
{
return match ($endpoint_data["action"]) {
"getMyFiles" => listFiles(),
"getAllFiles" => listFiles(false),
"UploadFiles" => parseIncomingFiles(),
default => ["Status" => "Fail", "message" => "Invalid action"],
};
}