feat(web): make assets cachable (#1724)

This commit is contained in:
Michel Heusschen
2023-02-10 23:01:35 +01:00
committed by GitHub
parent 74cd3d66c6
commit d91cc3616b
38 changed files with 91 additions and 82 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import { error } from '@sveltejs/kit';
import { getThumbnailUrl } from '$lib/utils/asset-utils';
import { serverApi, ThumbnailFormat } from '@api';
import type { PageServerLoad } from './$types';
import featurePanelUrl from '$lib/assets/feature-panel.png';
export const load: PageServerLoad = async ({ params, parent }) => {
const { user } = await parent();
@@ -23,7 +24,7 @@ export const load: PageServerLoad = async ({ params, parent }) => {
description: sharedLink.description || `${assetCount} shared photos & videos.`,
imageUrl: assetId
? getThumbnailUrl(assetId, ThumbnailFormat.Webp, sharedLink.key)
: 'feature-panel.png'
: featurePanelUrl
},
user
};