mirror of
https://github.com/immich-app/immich.git
synced 2025-07-03 21:40:00 +02:00
fix(web): download archive for public user (#10877)
This commit is contained in:
parent
3cd187dced
commit
23b3073687
2 changed files with 10 additions and 2 deletions
web/src/lib/utils
|
@ -21,6 +21,7 @@ import {
|
|||
type AssetResponseDto,
|
||||
type AssetTypeEnum,
|
||||
type DownloadInfoDto,
|
||||
type UserPreferencesResponseDto,
|
||||
type UserResponseDto,
|
||||
} from '@immich/sdk';
|
||||
import { DateTime } from 'luxon';
|
||||
|
@ -100,8 +101,8 @@ export const downloadBlob = (data: Blob, filename: string) => {
|
|||
};
|
||||
|
||||
export const downloadArchive = async (fileName: string, options: Omit<DownloadInfoDto, 'archiveSize'>) => {
|
||||
const $preferences = get(preferences);
|
||||
const dto = { ...options, archiveSize: $preferences.download.archiveSize };
|
||||
const $preferences = get<UserPreferencesResponseDto | undefined>(preferences);
|
||||
const dto = { ...options, archiveSize: $preferences?.download.archiveSize };
|
||||
|
||||
const [error, downloadInfo] = await withError(() => getDownloadInfo({ downloadInfoDto: dto, key: getKey() }));
|
||||
if (error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue