$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); // The archive no longer matches the gallery's contents. archive_mark_dirty($slug, $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'; // The site root is one directory up from admin/ (cf. the "../gallery/" link below). $basePath = str_replace('\\', '/', dirname(dirname($_SERVER['SCRIPT_NAME'] ?? '/admin/gallery-edit.php'))); $basePath = rtrim($basePath, '/'); $shareUrl = $scheme . '://' . $host . $basePath . '/gallery/?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']) : ''; // Topics split the gallery into sections; a gallery with none renders exactly // as it did before they existed. $topics = gallery_topics($gallery); admin_header($gallery['title'], 'galleries'); flash_render(); ?>

Share link:

Upload images

Drop images here or click to select.
Uploaded through the site to S3, .

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.

Download all

Offers visitors a single ZIP of every photo. It is assembled once and stored on S3, so the download itself never runs through this webhost — and it is rebuilt automatically whenever images are added or removed. While a rebuild is pending the button on the gallery is disabled, so nobody receives an archive that is missing the newest photos.

Ready · · photos · built Building — of photos done. 0): ?> Queued — the rebuild starts in about min. Queued — the rebuild starts shortly. Out of date — the archive does not match the current images. No archive yet.

Settings

Topics

Topics split the gallery into sections — the days of a trip, the stops of a shoot. They are optional: images without a topic always come first, and a gallery with no topics looks exactly as it always did. Guests upload into "", which appears by itself the first time someone uses the guest link.

$topic): ?>
TopicOrder

Images ()