feat(web/server) public album sharing (#1266)

This commit is contained in:
Alex 2023-01-09 14:16:08 -06:00 committed by GitHub
parent fd15cdbf40
commit 10789503c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
101 changed files with 4879 additions and 347 deletions

View file

@ -11,6 +11,7 @@
} from '../shared-components/notification/notification';
export let assetId: string;
export let publicSharedKey = '';
let assetInfo: AssetResponseDto;
let assetData: string;
@ -18,7 +19,11 @@
let copyImageToClipboard: (src: string) => Promise<Blob>;
onMount(async () => {
const { data } = await api.assetApi.getAssetById(assetId);
const { data } = await api.assetApi.getAssetById(assetId, {
params: {
key: publicSharedKey
}
});
assetInfo = data;
//Import hack :( see https://github.com/vadimkorr/svelte-carousel/issues/27#issuecomment-851022295
@ -29,6 +34,9 @@
const loadAssetData = async () => {
try {
const { data } = await api.assetApi.serveFile(assetInfo.id, false, true, {
params: {
key: publicSharedKey
},
responseType: 'blob'
});