Skip to content

feat: short link support#9458

Open
okatu-loli wants to merge 4 commits intoAlistGo:mainfrom
okatu-loli:feat/short-link-support
Open

feat: short link support#9458
okatu-loli wants to merge 4 commits intoAlistGo:mainfrom
okatu-loli:feat/short-link-support

Conversation

@okatu-loli
Copy link
Copy Markdown
Collaborator

No description provided.

skysliences
skysliences previously approved these changes Mar 29, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_id share 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants