3518555d1e
R2 S3 Signature V4 client in [src/R2/R2Client.php](/Users/tyemeclifford/Documents/GH/CloudflareR2-Manager/src/R2/R2Client.php) SQLite mirror, usage ledger, settings, local tags, permission labels, and signed URL history under [src/Repository](/Users/tyemeclifford/Documents/GH/CloudflareR2-Manager/src/Repository) Simple password auth and CSRF protection Uploads, folders, sync, copy/move/delete, downloads, presigned URLs, CORS JSON management, and usage/billing-style summaries Setup docs in [README.md](/Users/tyemeclifford/Documents/GH/CloudflareR2-Manager/README.md) and config template in [.env.example](/Users/tyemeclifford/Documents/GH/CloudflareR2-Manager/.env.example) Important R2 caveat: Cloudflare’s current R2 S3 compatibility docs say ACLs and object-tagging APIs are not implemented, so the app stores tags and permission labels locally in SQLite while keeping file bytes on R2. I used Cloudflare’s official docs for S3 compatibility, presigned URLs, and CORS.
32 lines
724 B
PHP
32 lines
724 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use R2Manager\Controller\AppController;
|
|
use R2Manager\R2\R2Client;
|
|
use R2Manager\Repository\ObjectRepository;
|
|
use R2Manager\Repository\SettingsRepository;
|
|
use R2Manager\Repository\UsageRepository;
|
|
use R2Manager\Support\Config;
|
|
use R2Manager\Support\Database;
|
|
use R2Manager\Support\Security;
|
|
|
|
require dirname(__DIR__) . '/src/bootstrap.php';
|
|
|
|
$config = new Config(dirname(__DIR__));
|
|
$database = new Database($config);
|
|
$security = new Security($config);
|
|
$r2 = new R2Client($config);
|
|
|
|
$controller = new AppController(
|
|
$config,
|
|
$security,
|
|
$r2,
|
|
new ObjectRepository($database),
|
|
new UsageRepository($database),
|
|
new SettingsRepository($database)
|
|
);
|
|
|
|
$controller->handle();
|
|
|