$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); // Guest upload link (only when a key is set). Same host/path derivation as above. $uploadUrl = !empty($gallery['upload_key']) ? $scheme . '://' . $host . $basePath . '/upload.php?g=' . rawurlencode($slug) . '&k=' . rawurlencode($gallery['upload_key']) : ''; 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.

Guest uploads

Share this link so guests can upload into this gallery without an admin account. It is key-protected and honors the gallery's password and expiry, if set.

Guest uploads are disabled. Enable them to get a shareable link that lets people upload into this gallery without an admin account.

Settings

Images ()