$img) { if (($img['key'] ?? '') === $key) { s3_delete($img['key']); if (!empty($img['thumb'])) { s3_delete($img['thumb']); } array_splice($gallery['images'], $i, 1); gallery_save($gallery); flash_set('Image deleted.'); break; } } redirect('gallery-edit.php?g=' . rawurlencode($slug)); } } // Build the share link from the page the admin is currently on, not from config, // so it matches whatever host/path this app is actually served under. $scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http'; $host = $_SERVER['HTTP_HOST'] ?? 'localhost'; // gallery.php lives one directory up from admin/ (cf. the "../gallery.php" link below). $basePath = str_replace('\\', '/', dirname(dirname($_SERVER['SCRIPT_NAME'] ?? '/admin/gallery-edit.php'))); $basePath = rtrim($basePath, '/'); $shareUrl = $scheme . '://' . $host . $basePath . '/gallery.php?g=' . rawurlencode($slug); admin_header($gallery['title'], 'galleries'); flash_render(); ?>

Share link:

Upload images

Drop images here or click to select.
Uploaded through the site to S3, in full resolution, unmodified. One file at a time.

Settings

Images ()