#76 add option to follow Immich per-link download settings

This commit is contained in:
Alan Grainger
2025-03-12 15:26:46 +08:00
parent c4f62ed818
commit 0bbe409cbb
8 changed files with 38 additions and 16 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { Asset, AssetType, ImageSize, IncomingShareRequest, SharedLink, SharedLinkResult } from './types'
import dayjs from 'dayjs'
import { addResponseHeaders, getConfigOption, log } from './functions'
import { addResponseHeaders, canDownload, getConfigOption, log } from './functions'
import render from './render'
import { Response } from 'express-serve-static-core'
import { respondToInvalidRequest } from './invalidRequestHandler'
@@ -105,7 +105,7 @@ class Immich {
// Everything is ok - output the shared link data
if (request.mode === 'download' && getConfigOption('ipp.allowDownloadAll', false)) {
if (request.mode === 'download' && canDownload(link)) {
// Download all assets as a zip file
await render.downloadAll(res, link)
} else if (link.assets.length === 1) {