Cofem/endpoints/upload.php

14 lines
336 B
PHP

<?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"],
};
}