Repository navigation
Conversation
- Environment & network tab: one QR code per IPv4 address encoding the photobooth URL on that network, to open it from another device - New remote storage queue tab showing per-file upload status, attempts, errors and timestamps (works with the existing auto-refresh toggle) - Add missing label for the remote storage log tab Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The build workflow runs "npm run build", which sorts en.json with localeCompare and then requires a clean working tree. The new remoteUpload* keys were placed after "rembglog" but localeCompare orders them after "remoteStorageTemplate", so the build modified the file and the status check failed. it.json is aligned for consistency. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The bundled gallery template ignores the photo query parameter, so the /?photo=<file> link opened the whole gallery instead of the picture. Keep the existing link; the deep link will be proposed separately together with template support.
…L and QR link Replace the overlapping remote storage settings with explicit ones: - `path`: full remote folder, used as written (replaces `baseFolder`, `folder` and the implicit title sub-folder) - `url`: public URL of that folder (replaces `website` and `urlTemplate`); when set, QR codes point to the remote storage, so `useForQr` is removed - `qr_link`: what is appended to the URL for a single photo, e.g. `/images/%file%` (default) or `/?photo=%file%` - `baseURL` is renamed to `host` `%title%` is the only placeholder of `path` and `url` and is replaced by the slug of the title, so changing the title still creates a folder per event. Also: - the QR code link is built in one place for screen and print - "Test connection" tests the values entered in the form, requires the admin session and CSRF token, and shows the resolved folder and an example QR code link - the default port follows the selected connection type - the bundled gallery template opens the photo given by `?photo=` and no longer builds broken links when the request has a query string - FAQ and manual texts updated BREAKING CHANGE: the old settings are not migrated, see the upgrade table in the FAQ.
…ection tests - Flysystem wraps e.g. a failed login into "creating parent directory failed": log and store the messages of the previous exceptions too - "Test connection" shows the reason returned by the server - the admin toast showed the default "success" headline in red when the test failed: show the translated outcome instead
reloxx13
left a comment
There was a problem hiding this comment.
Review of PR #1677
- P1: Migrate saved FTP settings before removing legacy keys. Existing baseURL, baseFolder, folder, website and urlTemplate values are discarded during normalization. Preserve the old upload paths and useForQr opt-in.
- P1: Restore explicit admin/rental authorization for reboot and shutdown. With login disabled, CSRF alone permits anonymous power actions.
- P2: Delete remote copies for pending and failed queue entries too. A successful image write followed by a failed thumbnail write leaves a publicly accessible image behind.
All three corrections are prepared locally on feature/remote-storage-settings, based on 90a4cda. They have not been pushed.
Validation: DDEV PHPUnit passed (35 tests, 53 assertions); PHPStan passed; changed PHP files passed PHP-CS-Fixer dry-run. Isolated endpoint-block checks passed with stubs. Global formatting check has an unrelated existing failure in private/scripts/upload-images-to-ftp.php.
Migrate legacy FTP paths and QR opt-in without replacing explicit new settings. Require admin or rental authorization for power commands even when login is disabled. Delete remote copies after partial upload failures.
reloxx13
left a comment
There was a problem hiding this comment.
Re-reviewed the three reported findings on 20ef523: legacy FTP settings and QR opt-in are migrated, reboot/shutdown require admin or rental authorization, and remote deletion includes partially failed uploads. All three findings are addressed. Validation: 35 PHPUnit tests (53 assertions), PHPStan, and scoped PHP-CS-Fixer passed. Endpoint branches were checked with isolated stubs; no live FTP or power commands were executed. Global formatting has an unrelated existing failure in private/scripts/upload-images-to-ftp.php. The corrective commit was prepared and pushed by this same assistant session.
Prerequisites checklist
What is the purpose of this pull request? (put an "x" next to an item)
What changes did you make? (Give an overview)
This is the follow-up announced in #1603: the remote storage (FTP/SFTP) settings are rewritten so that they say exactly what they do. The old settings were modelled on one specific hosting layout and overlapped each other.
New settings
baseURLhostbaseFolder+folder+ implicit title sub-folderpath: the full remote folder, used exactly as writtenwebsite+urlTemplateurl: the public URL of that folderuseForQrurlis set/images/+qr.append_filenameqr_link: what is appended tourlfor a single photo%title%is the only placeholder ofpathandurl. It is replaced by the slug of the title, so changing the title for every event still gives a folder (and gallery) per event.qr_linkdefaults to/images/%file%(unchanged behaviour)./?photo=%file%opens the photo inside the gallery page; empty links to the gallery.path = www.example.com/photobooth/%title%,url = https://example.com/photobooth/%title%, titleMy Event→ upload to/www.example.com/photobooth/my-event/images/<file>, QR codehttps://example.com/photobooth/my-event/images/<file>.Problems of the old settings that this fixes
folderwas slugified for the upload path but used raw in the QR URL, so any value containing e.g. a slash produced a QR code pointing to a different place than the upload.folderas/path/to/directory, which the slug made impossible, and documentedurlTemplateplaceholders (%baseFolder,%date) that were never implemented.api/qrcode.php,api/print.php); it now comes from one method ofRemoteStorageService.Test connection
Error reporting
creating parent directory failed. The messages of the previous exceptions are now logged and stored in the upload queue too, so the real cause is visible.Bundled gallery template
?photo=<file>: the gallery opens with that photo in the lightbox (download, share, close to go back to the gallery). This is the default-installation support for the deep link that was requested in the review of feat(remote-storage): add async FTP/SFTP uploads with JSON queue and upload tracking #1603.Docs / translations
enanditmanual texts rewritten. In the other languages the keys of the removed settings are deleted, and the few texts that described the old behaviour are removed so they fall back to English.Breaking change
The old settings are not migrated: after updating, the remote storage settings have to be entered again (see the upgrade table in the FAQ). I think this is acceptable for a feature with few users and it keeps the code free of legacy handling, but I can add a migration if you prefer.
Is there anything you'd like reviewers to focus on?
ftpalthough it also covers SFTP; I left the key untouched to limit the change.api/testFtpConnection.phpnow goes throughadmin/admin_boot.phpandcheckCsrfOrFail().Tested on a live installation with a real FTP server: connection test (failure with wrong credentials), upload of pictures and thumbnails to the folder resolved from
path, queue draining.npm run buildwas run on that installation andnpx eslintis clean on the touched JS files; all touched PHP files were syntax-checked. The?photo=view of the bundled template has not been exercised against a remote server yet, and no automated tests were added.AI used to create this Pull Request?
Yes. This PR was developed with Claude Code (Anthropic). The AI analysed the existing settings, proposed the new model and wrote the implementation; I decided the design (single path / public URL, configurable QR link, no automatic migration) and tested the upload flow on a real installation against my FTP server.