Return null if MaxFileSizeBytes is 0 (#2409)

* Return "null" if MaxFileSizeBytes is 0

* Add comment and nil check (better save than sorry)

* Simplify config
This commit is contained in:
Till 2022-05-02 10:47:16 +02:00 committed by GitHub
parent bfa344e831
commit 979a551f1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 18 deletions

View file

@ -551,7 +551,7 @@ func (r *downloadRequest) getRemoteFile(
// If we do not have a record, we need to fetch the remote file first and then respond from the local file
err := r.fetchRemoteFileAndStoreMetadata(
ctx, client,
cfg.AbsBasePath, *cfg.MaxFileSizeBytes, db,
cfg.AbsBasePath, cfg.MaxFileSizeBytes, db,
cfg.ThumbnailSizes, activeThumbnailGeneration,
cfg.MaxThumbnailGenerators,
)