Change default download filenames to anonymised hash
This commit is contained in:
@@ -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`
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -25,6 +25,8 @@ version. Breaking changes and renamed config keys land in major versions and are
|
||||
[`allowDownload`](/config/ipp-options#allowdownload).
|
||||
- **A custom `invalidRequestHandler.js` must be copied again from the 4.0 image.** A copy taken from 3.x fails to
|
||||
load. See [Custom function](/config/error-responses#custom-function).
|
||||
- **Downloads are named by share and position by default, not by the original filename.** Set
|
||||
[`downloadedFilename`](/config/ipp-options#downloadedfilename) to `0` to keep the original filenames.
|
||||
|
||||
Visitor uploads are new in 4.0. An existing install is not affected until you add the upload service: IPP looks for
|
||||
it at `/upload` on its own hostname and shows the "Add photos" button only when the upload service answers there. See
|
||||
|
||||
Reference in New Issue
Block a user