By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
Adds an optional path parameter to share links that allows specifying a custom redirect path when accessing a resource.
This feature addresses a specific use case, if this change is not desired in the main branch, or if any changes are required, I would be more than happy to cooperate.
The use case in question:
I run an Immich instance with shared albums
In order to allow users to upload pictures, the /api/ endpoint needs to be exposed, which is undesirable
Share links would mitigate this, as they use a cookie to only allow users with a link to access the resource
However, the link redirects to the base URL of the resource, with no option to change this
Thus, I have added the option to add an (optional) path onto a share link's redirect (e.g. share/xxxx)
Changes Made
Added path column in the resourceAccessToken schema in Postgres and SQLite schemas (optional field, so not a breaking change)
Added field in CreateSharedLinkForm.tsx
Change generateAccessToken.ts to accept and return path value
Change authWithAccessToken.ts to add the path onto the redirect url
Add translations for the new field
How to test?
Go to Access > Links
Create a new Share Link
Optionally add a path
Confirm that the final redirect leads to the expected location, and does not result in malformed URLs
(This is my first open-source contribution, thank you for your patience)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/fosrl/pangolin/pull/2434
**Author:** [@NHClaessens](https://github.com/NHClaessens)
**Created:** 2/8/2026
**Status:** 🔄 Open
**Base:** `main` ← **Head:** `feature-share-link-redirect-path`
---
### 📝 Commits (7)
- [`db34247`](https://github.com/fosrl/pangolin/commit/db34247840228e41b90cafe8b27333445a3523d8) Alter schema + add form field
- [`2b8a0ad`](https://github.com/fosrl/pangolin/commit/2b8a0ad97c18b4e95350228d409fd14fd13b6ad4) Adjust validation to allow creation with (optional) path
- [`ceec9e9`](https://github.com/fosrl/pangolin/commit/ceec9e9dbcac97e5aea6b6a5297d0b1eb75c26db) Add path onto redirectUrl
- [`661f135`](https://github.com/fosrl/pangolin/commit/661f135aa1c8a54a83488b1002ac7ea3afefaf02) Add translations
- [`eb98592`](https://github.com/fosrl/pangolin/commit/eb985924f74dc3a36b8b428c75c2cdf970177bf4) Update postgres schema
- [`f1a92f2`](https://github.com/fosrl/pangolin/commit/f1a92f2202b64af961915e7ad3b187b866cf175e) Merge branch 'main' into feature-share-link-redirect-path
- [`06d81a2`](https://github.com/fosrl/pangolin/commit/06d81a2b511ce35feb99fc8de176e7573fddb353) Merge branch 'main' into feature-share-link-redirect-path
### 📊 Changes
**24 files changed** (+269 additions, -27 deletions)
<details>
<summary>View changed files</summary>
➕ `drizzle.config.ts` (+15 -0)
📝 `messages/bg-BG.json` (+1 -0)
📝 `messages/cs-CZ.json` (+1 -0)
📝 `messages/de-DE.json` (+1 -0)
📝 `messages/en-US.json` (+1 -0)
📝 `messages/es-ES.json` (+1 -0)
📝 `messages/fr-FR.json` (+1 -0)
📝 `messages/it-IT.json` (+1 -0)
📝 `messages/ko-KR.json` (+1 -0)
📝 `messages/nb-NO.json` (+1 -0)
📝 `messages/nl-NL.json` (+1 -0)
📝 `messages/pl-PL.json` (+1 -0)
📝 `messages/pt-PT.json` (+1 -0)
📝 `messages/ru-RU.json` (+1 -0)
📝 `messages/tr-TR.json` (+1 -0)
📝 `messages/zh-CN.json` (+1 -0)
📝 `messages/zh-TW.json` (+1 -0)
📝 `package-lock.json` (+6 -24)
📝 `server/db/pg/schema/schema.ts` (+1 -0)
📝 `server/db/sqlite/schema/schema.ts` (+1 -0)
_...and 4 more files_
</details>
### 📄 Description
## Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
## Description
Adds an optional `path` parameter to share links that allows specifying a custom redirect path when accessing a resource.
This feature addresses a specific use case, if this change is not desired in the main branch, or if any changes are required, I would be more than happy to cooperate.
The use case in question:
- I run an Immich instance with shared albums
- In order to allow users to upload pictures, the `/api/` endpoint needs to be exposed, which is undesirable
- Share links would mitigate this, as they use a cookie to only allow users with a link to access the resource
- However, the link redirects to the base URL of the resource, with no option to change this
- Thus, I have added the option to add an (optional) path onto a share link's redirect (e.g. `share/xxxx`)
## Changes Made
- Added `path` column in the `resourceAccessToken` schema in Postgres and SQLite schemas (optional field, so not a breaking change)
- Added field in CreateSharedLinkForm.tsx
- Change generateAccessToken.ts to accept and return `path` value
- Change authWithAccessToken.ts to add the path onto the redirect url
- Add translations for the new field
## How to test?
1. Go to `Access` > `Links`
2. Create a new Share Link
3. Optionally add a path
4. Confirm that the final redirect leads to the expected location, and does not result in malformed URLs
(This is my first open-source contribution, thank you for your patience)
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/fosrl/pangolin/pull/2434
Author: @NHClaessens
Created: 2/8/2026
Status: 🔄 Open
Base:
main← Head:feature-share-link-redirect-path📝 Commits (7)
db34247Alter schema + add form field2b8a0adAdjust validation to allow creation with (optional) pathceec9e9Add path onto redirectUrl661f135Add translationseb98592Update postgres schemaf1a92f2Merge branch 'main' into feature-share-link-redirect-path06d81a2Merge branch 'main' into feature-share-link-redirect-path📊 Changes
24 files changed (+269 additions, -27 deletions)
View changed files
➕
drizzle.config.ts(+15 -0)📝
messages/bg-BG.json(+1 -0)📝
messages/cs-CZ.json(+1 -0)📝
messages/de-DE.json(+1 -0)📝
messages/en-US.json(+1 -0)📝
messages/es-ES.json(+1 -0)📝
messages/fr-FR.json(+1 -0)📝
messages/it-IT.json(+1 -0)📝
messages/ko-KR.json(+1 -0)📝
messages/nb-NO.json(+1 -0)📝
messages/nl-NL.json(+1 -0)📝
messages/pl-PL.json(+1 -0)📝
messages/pt-PT.json(+1 -0)📝
messages/ru-RU.json(+1 -0)📝
messages/tr-TR.json(+1 -0)📝
messages/zh-CN.json(+1 -0)📝
messages/zh-TW.json(+1 -0)📝
package-lock.json(+6 -24)📝
server/db/pg/schema/schema.ts(+1 -0)📝
server/db/sqlite/schema/schema.ts(+1 -0)...and 4 more files
📄 Description
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
Adds an optional
pathparameter to share links that allows specifying a custom redirect path when accessing a resource.This feature addresses a specific use case, if this change is not desired in the main branch, or if any changes are required, I would be more than happy to cooperate.
The use case in question:
/api/endpoint needs to be exposed, which is undesirableshare/xxxx)Changes Made
pathcolumn in theresourceAccessTokenschema in Postgres and SQLite schemas (optional field, so not a breaking change)pathvalueHow to test?
Access>Links(This is my first open-source contribution, thank you for your patience)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.