forked from Adleraci/adlerka.top
Add upload backend
This commit is contained in:
14
endpoints/upload.php
Normal file
14
endpoints/upload.php
Normal 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"],
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user