Initial commit - Mini CMS complet (PHP + Docker + MinIO)

This commit is contained in:
Aya Tess tess
2025-11-01 16:42:38 +01:00
commit 9a57013505
3035 changed files with 131442 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<?php
require_once __DIR__ . '/config.php'; // doit définir $s3Client et $bucketName
// crée un petit fichier temporaire
$tmp = '/tmp/test_minio_upload_'.time().'.txt';
file_put_contents($tmp, "test upload ".time());
try {
$key = "uploads/test_manual_".time().".txt";
$res = $s3Client->putObject([
'Bucket' => $bucketName,
'Key' => $key,
'SourceFile' => $tmp,
'ACL' => 'public-read',
'ContentType' => 'text/plain'
]);
echo "OK upload: ".$res['ObjectURL'].PHP_EOL;
} catch (Exception $e) {
echo "ERR: ".$e->getMessage().PHP_EOL;
echo $e->getTraceAsString();
}