Lower default concurrency
This commit is contained in:
@@ -165,7 +165,7 @@ Alternatively, you can [pass the configuration inline](docs/inline-configuration
|
|||||||
| `downloadOriginalPhoto` | `bool` | Set to `false` if you only want people to be able to download the 'preview' quality photo, rather than your original photo. |
|
| `downloadOriginalPhoto` | `bool` | Set to `false` if you only want people to be able to download the 'preview' quality photo, rather than your original photo. |
|
||||||
| `downloadedFilename` | `int` | The filename of the downloaded image.<br>`0` for the original filename if available, falling back to the Immich asset ID<br>`1` for the Immich asset ID number<br>`2` for a shortened version of the asset ID: `img_` plus the first 8 characters of the asset ID |
|
| `downloadedFilename` | `int` | The filename of the downloaded image.<br>`0` for the original filename if available, falling back to the Immich asset ID<br>`1` for the Immich asset ID number<br>`2` for a shortened version of the asset ID: `img_` plus the first 8 characters of the asset ID |
|
||||||
| `allowDownloadAll` | `int` | Allow visitors to download all files as a zip, including the selective-download flow in multi-select mode.<br>`0` disable downloads<br>`1` follow Immich setting per share ([example](https://github.com/user-attachments/assets/79ea8c08-71ce-42ab-b025-10aec384938a))<br>`2` always allowed |
|
| `allowDownloadAll` | `int` | Allow visitors to download all files as a zip, including the selective-download flow in multi-select mode.<br>`0` disable downloads<br>`1` follow Immich setting per share ([example](https://github.com/user-attachments/assets/79ea8c08-71ce-42ab-b025-10aec384938a))<br>`2` always allowed |
|
||||||
| `downloadFromImmichConcurrencyLimit` | `int` | Maximum number of assets IPP will fetch from your Immich server in parallel when building a "download all" zip. Defaults to `20`. Lower this if your Immich server is slow or you see download timeouts on large albums; raise it for faster downloads if your server can handle the load. |
|
| `downloadFromImmichConcurrencyLimit` | `int` | Maximum number of assets IPP will fetch from your Immich server in parallel when building a "download all" zip. Defaults to `8`. Lower this if your Immich server is slow or you see download timeouts on large albums; raise it for faster downloads if your server can handle the load. |
|
||||||
| `allowSlugLinks` | `bool` | Enable/disable the custom URL links. |
|
| `allowSlugLinks` | `bool` | Enable/disable the custom URL links. |
|
||||||
| `showHomePage` | `bool` | Set to `false` to remove the IPP shield page at `/` and at `/share` |
|
| `showHomePage` | `bool` | Set to `false` to remove the IPP shield page at `/` and at `/share` |
|
||||||
| `gallery` | `object` | Gallery-page options, see the [Gallery options](#gallery-options) section below. |
|
| `gallery` | `object` | Gallery-page options, see the [Gallery options](#gallery-options) section below. |
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
"downloadOriginalPhoto": true,
|
"downloadOriginalPhoto": true,
|
||||||
"downloadedFilename": 0,
|
"downloadedFilename": 0,
|
||||||
"allowDownloadAll": 0,
|
"allowDownloadAll": 0,
|
||||||
"downloadFromImmichConcurrencyLimit": 20,
|
"downloadFromImmichConcurrencyLimit": 8,
|
||||||
"allowSlugLinks": true,
|
"allowSlugLinks": true,
|
||||||
"showHomePage": true,
|
"showHomePage": true,
|
||||||
"showMetadata": {
|
"showMetadata": {
|
||||||
|
|||||||
+3
-4
@@ -209,11 +209,10 @@ class Render {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stream the given assets back as a zip file. Caller is responsible for
|
* Stream the given assets back as a zip file.
|
||||||
* checking that every asset belongs to the share (security boundary).
|
|
||||||
*
|
*
|
||||||
* Assets are fetched from Immich with a bounded concurrency (configurable via
|
* Assets are fetched from Immich with a bounded concurrency (configurable via
|
||||||
* `ipp.downloadFromImmichConcurrencyLimit`, default 20) rather than all at once.
|
* `ipp.downloadFromImmichConcurrencyLimit`, default 8) rather than all at once.
|
||||||
* Fetching every asset in parallel overwhelms the Immich server on large albums
|
* Fetching every asset in parallel overwhelms the Immich server on large albums
|
||||||
* and causes the client download to time out before the first bytes are sent.
|
* and causes the client download to time out before the first bytes are sent.
|
||||||
*
|
*
|
||||||
@@ -228,7 +227,7 @@ class Render {
|
|||||||
*/
|
*/
|
||||||
async downloadAssets (res: Response, share: SharedLink, assets: Asset[]) {
|
async downloadAssets (res: Response, share: SharedLink, assets: Asset[]) {
|
||||||
const downloadOriginalAsset = getConfigOption('ipp.downloadOriginalPhoto', true)
|
const downloadOriginalAsset = getConfigOption('ipp.downloadOriginalPhoto', true)
|
||||||
const concurrency = Math.max(1, getConfigOption('ipp.downloadFromImmichConcurrencyLimit', 20) as number)
|
const concurrency = Math.max(1, getConfigOption('ipp.downloadFromImmichConcurrencyLimit', 8) as number)
|
||||||
res.setHeader('Content-Type', 'application/zip')
|
res.setHeader('Content-Type', 'application/zip')
|
||||||
let filename = (sanitize(this.title(share)) || 'photos') + '.zip'
|
let filename = (sanitize(this.title(share)) || 'photos') + '.zip'
|
||||||
filename = encodeURI(filename)
|
filename = encodeURI(filename)
|
||||||
|
|||||||
Reference in New Issue
Block a user