mirror of
https://github.com/photoprism/photoprism.git
synced 2026-03-02 22:57:18 -05:00
Sharing: Add Shared Albums to Home Screen #1194
Labels
No labels
ai
android
api
auth
awesome
bug
bug
ci
cli
config
database
declined
deprecated
docker
docs 📚
documents
duplicate
easy
enhancement
enhancement
enhancement
epic
faces
feedback wanted
frontend
hacktoberfest
help wanted
idea
in-progress
incomplete
index
invalid
ios
labels
live
live
low-priority
macos
member-feature
metadata
mobile
nas
needs-analysis
no-coding-required
no-coding-required
observability
performance
places
please-test
plus-feature
priority
pro-feature
question
raspberry-pi
raw
released
released
released
research
resolved
security
sharing
tested
tests
third-party-issue
thumbnails
upgrade
upstream-issue
ux
vector
video
waiting
won't fix
won't fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/photoprism#1194
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bcardiff on GitHub (Oct 25, 2021).
I wanted to share an album with family and friends. I plan to add photos to that album in weeks and months to come. So I wanted to simplify how they can keep the shared album link during that period. Installing the shared album as a PWA seems like a good way to achieve that.
I would have expected that the shared album page could be added as a PWA that will open the album directly. But that is not happening.
When adding the page to Home Screen (The regular iOS PWA install), the root url is used and hence the guest will see the login screen.
Would it make sense to customize the "start_url" of the manifest in the shared album page? Other properties that could have sensible values for the shared album I can think of are title and image, to show the album title and album cover.
From what I can see in the code the manifest in the shared views are fixed here
github.com/photoprism/photoprism@caf7920672/assets/templates/share.tmpl (L27)and the manifest has a single route defined ingithub.com/photoprism/photoprism@8e5a97ed4a/internal/server/routes.go (L22-L28).Regarding the implementation, would it make sense to add a route
/s/:secret/manifest.jsonand use that instead of the root site manifest?@lastzero commented on GitHub (Oct 27, 2021):
AFAIK there's a convention that the
manifest.jsonmust be in the root path like the PWA worker. Also browsers have special caching rules for themanifest.json, so that simple anti cache HTTP headers won't work.Shouldn't be an issue to just install it on the home screen like a regular Web site / app, maybe with a few changes if it's not working right now. I suspect it's an authentication issue as the album URL doesn't contain the secret token. You would have to use the original share URL containing the secret token. Otherwise everyone could open the album.
@alchemyconsulting commented on GitHub (Jan 2, 2022):
Yup I get this complaint from pretty much everyone I share an album with. Would be great to get a fix or workaround for this :)
@bcardiff commented on GitHub (Jan 23, 2022):
My current workaround was to drop a some files in a folder like
/a/simple-name/index.htmlwith it's own manifest and icons. In my setup I use caddy. I instruct to serve /a/* from local files instead of upstream and it does the trick.The index.html is a cover image with a link to view photos via the secret link, but the manifest points to the secret link directly. The cover page/image is viewed once.
Sometimes when accessing the album it redirects to the login screen, not sure why. But it's a matter of clicking again in the link from the home page and it works.
I can share the setup details if wanted.
I tried to overwrite via caddy the response, but I couldn't. Using caddy for the first time, configuring it via docker, compiling a custom docker image because replace-response extension and dealing with compression with upstream was just a bit to much 🙈 . So, I use a simpler approach.
@alanmcginnis commented on GitHub (Jun 21, 2023):
Thank you for the feedback. I have been creating shortcuts on iOS that open the original share link URL. I have then been sharing those shortcuts with my family. This is a specific use case but an easy workaround for the Apple ecosystem. Android may have something similar.
They can then add the shortcut to the home screen.