refactor(web): shared link key auth (#3855)

This commit is contained in:
Jason Rasmussen
2023-08-25 00:03:28 -04:00
committed by GitHub
parent 10c2bda3a9
commit 9bbef4a97b
21 changed files with 115 additions and 108 deletions

View File

@@ -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',
},