mirror of
https://github.com/immich-app/immich.git
synced 2025-11-29 08:30:03 +09:00
refactor(web): shared link key auth (#3855)
This commit is contained in:
@@ -8,12 +8,10 @@
|
||||
import { photoZoomState } from '$lib/stores/zoom-image.store';
|
||||
|
||||
export let asset: AssetResponseDto;
|
||||
export let publicSharedKey = '';
|
||||
export let element: HTMLDivElement | undefined = undefined;
|
||||
|
||||
let imgElement: HTMLDivElement;
|
||||
|
||||
let assetData: string;
|
||||
|
||||
let copyImageToClipboard: (src: string) => Promise<Blob>;
|
||||
let canCopyImagesToClipboard: () => boolean;
|
||||
|
||||
@@ -28,7 +26,7 @@
|
||||
const loadAssetData = async () => {
|
||||
try {
|
||||
const { data } = await api.assetApi.serveFile(
|
||||
{ id: asset.id, isThumb: false, isWeb: true, key: publicSharedKey },
|
||||
{ id: asset.id, isThumb: false, isWeb: true, key: api.getKey() },
|
||||
{
|
||||
responseType: 'blob',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user