Change default download filenames to anonymised hash

This commit is contained in:
Alan Grainger
2026-10-08 10:31:35 +13:00
parent e7836b85f7
commit 5cddddd9f7
16 changed files with 328 additions and 83 deletions
+24 -4
View File
@@ -75,13 +75,33 @@ Clips are only fetched while the toggle is on, so leaving this on costs no extra
## `downloadedFilename`
**Type:** `int` · **Default:** `0`
**Type:** `int` · **Default:** `2`
The filename of the downloaded image.
How downloaded files are named, both in the zip and for a single download. The extension always matches the bytes
served, so a preview download of a HEIC photo is `.jpg`.
- `0` - the original filename if available, falling back to the Immich asset ID.
- `1` - the Immich asset ID number.
- `2` - a shortened version of the asset ID: `img_` plus the first 8 characters of the asset ID.
- `1` - the Immich asset ID.
- `2` - an anonymous name made from the share and the item's position in it: the first 8 characters of a hash of
the share key, then the 1-based position in the order the gallery shows, zero-padded to at least three digits.
```
a3f9c2e1_001.jpg
a3f9c2e1_002.jpg
a3f9c2e1_003.mp4
```
With `2`, the same share always gives the same names, and a few selected items keep their positions in the whole
share. Unzipping a second download over the first replaces it. If the share's content or order changes, positions
shift, so a re-download then replaces files with different photos.
```json
{
"ipp": {
"downloadedFilename": 0
}
}
```
## `allowDownload`
+4
View File
@@ -31,6 +31,10 @@ The `lightGallery` section from IPP 1.x became `ipp.lightbox`.
| `ipp.allowDownloadAll` | `ipp.allowDownload`, same `0` / `1` / `2` values |
| `ipp.downloadOriginalPhoto` | `ipp.maxDownloadQuality`: `true` is `"original"`, `false` is `"preview"` |
[`ipp.downloadedFilename`](/config/ipp-options#downloadedfilename) keeps its name, but its default is now `2`
(share hash plus position) and `2` no longer means `img_` plus part of the asset ID. Set `0` to keep original
filenames.
## Metadata
`ipp.showMetadata.description` is an object, `{ "caption": <bool>, "sidebar": <bool> }`. A plain `true` or `false` is