Upload via GUI (258 Dateien)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/** Vorschaubild eines Katalogeintrags (nur Admins): /staff/catalog_preview.php?kind=plugin|theme&slug=... */
|
||||
require_once __DIR__ . '/../includes/bootstrap.php';
|
||||
require_admin();
|
||||
session_write_close();
|
||||
|
||||
$img = catalog_preview_image((string) ($_GET['kind'] ?? ''), (string) ($_GET['slug'] ?? ''));
|
||||
if (!$img) { http_response_code(404); exit; }
|
||||
header('Content-Type: ' . $img['mime']);
|
||||
header('Content-Length: ' . strlen($img['data']));
|
||||
header('X-Content-Type-Options: nosniff');
|
||||
header('Cache-Control: private, max-age=86400');
|
||||
echo $img['data'];
|
||||
Reference in New Issue
Block a user