mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
fix(web,server): use POST request to get download info (#3694)
* fix(web,server): use POST request to get download info * chore: open api
This commit is contained in:
@@ -13,7 +13,7 @@ import { IAssetRepository } from './asset.repository';
|
||||
import {
|
||||
AssetIdsDto,
|
||||
DownloadArchiveInfo,
|
||||
DownloadDto,
|
||||
DownloadInfoDto,
|
||||
DownloadResponseDto,
|
||||
MemoryLaneDto,
|
||||
TimeBucketAssetDto,
|
||||
@@ -176,7 +176,7 @@ export class AssetService {
|
||||
return this.storageRepository.createReadStream(asset.originalPath, mimeTypes.lookup(asset.originalPath));
|
||||
}
|
||||
|
||||
async getDownloadInfo(authUser: AuthUserDto, dto: DownloadDto): Promise<DownloadResponseDto> {
|
||||
async getDownloadInfo(authUser: AuthUserDto, dto: DownloadInfoDto): Promise<DownloadResponseDto> {
|
||||
const targetSize = dto.archiveSize || HumanReadableSize.GiB * 4;
|
||||
const archives: DownloadArchiveInfo[] = [];
|
||||
let archive: DownloadArchiveInfo = { size: 0, assetIds: [] };
|
||||
@@ -234,7 +234,7 @@ export class AssetService {
|
||||
return { stream: zip.stream };
|
||||
}
|
||||
|
||||
private async getDownloadAssets(authUser: AuthUserDto, dto: DownloadDto): Promise<AsyncGenerator<AssetEntity[]>> {
|
||||
private async getDownloadAssets(authUser: AuthUserDto, dto: DownloadInfoDto): Promise<AsyncGenerator<AssetEntity[]>> {
|
||||
const PAGINATION_SIZE = 2500;
|
||||
|
||||
if (dto.assetIds) {
|
||||
|
||||
Reference in New Issue
Block a user