+6
-4
@@ -12,12 +12,14 @@ export function title (share: SharedLink): string {
|
||||
}
|
||||
|
||||
/**
|
||||
* Decide whether the given shared link is downloadable. The `ipp.allowDownloadAll`
|
||||
* config controls the policy: disabled, follow the per-share Immich setting,
|
||||
* or always allowed.
|
||||
* Decide whether the given shared link's download UI is shown (the "download
|
||||
* all" zip, multi-select download, and the per-asset lightbox button). The
|
||||
* `ipp.allowDownload` config controls the policy: disabled, follow the
|
||||
* per-share Immich setting, or always allowed. This is purely a UI gate - it
|
||||
* does not affect image quality (see `gallery/sizing.ts`).
|
||||
*/
|
||||
export function canDownload (share: SharedLink): boolean {
|
||||
const allowDownloadConfig = getConfigOption('ipp.allowDownloadAll', 0) as DownloadAll
|
||||
const allowDownloadConfig = getConfigOption('ipp.allowDownload', 0) as DownloadAll
|
||||
if (!allowDownloadConfig) {
|
||||
// Downloading is disabled in config.json
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user