mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(web/server) public album sharing (#1266)
This commit is contained in:
parent
fd15cdbf40
commit
10789503c1
101 changed files with 4879 additions and 347 deletions
|
|
@ -4,13 +4,14 @@ import { UserResponseDto } from './open-api';
|
|||
|
||||
const _basePath = '/api';
|
||||
|
||||
export function getFileUrl(assetId: string, isThumb?: boolean, isWeb?: boolean) {
|
||||
export function getFileUrl(assetId: string, isThumb?: boolean, isWeb?: boolean, key?: string) {
|
||||
const urlObj = new URL(`${window.location.origin}${_basePath}/asset/file/${assetId}`);
|
||||
|
||||
if (isThumb !== undefined && isThumb !== null)
|
||||
urlObj.searchParams.append('isThumb', `${isThumb}`);
|
||||
if (isWeb !== undefined && isWeb !== null) urlObj.searchParams.append('isWeb', `${isWeb}`);
|
||||
|
||||
if (key !== undefined && key !== null) urlObj.searchParams.append('key', key);
|
||||
return urlObj.href;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue