Open
Conversation
skysliences
previously approved these changes
Mar 29, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds first-class “share/short link” support to the server, including public share APIs, share page routing, and persistence for share metadata and access control.
Changes:
- Added
/s/:share_idshare page routing plus/sd(download) and/sp(proxy/preview) endpoints. - Implemented authenticated share-management APIs (
/api/share/*) and public share APIs (/api/public/share/*). - Introduced Share model + DB migration + access-token signing and DB helpers for share access tracking.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| server/router.go | Registers share page, share download/proxy routes, and share public/private API endpoints. |
| server/handles/share_public.go | Implements public share info/auth/list/get plus share download/proxy handlers. |
| server/handles/share_page.go | Serves the SPA entry for share pages (data-page="share"). |
| server/handles/share.go | Implements share creation/update/list/disable/delete and shared helper logic (tokens, path resolution, URL building). |
| internal/share/access.go | Adds HMAC-signed share access tokens with TTL and verification. |
| internal/model/share.go | Adds the Share GORM model and share-related helpers (expiry/consumption/access limits). |
| internal/db/share.go | Adds DB CRUD + counters + transactional access counting for shares. |
| internal/db/db.go | Adds model.Share to auto-migrations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.