immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
45.08k stars 2.18k forks source link

[BUG] Accepted file type mismatch between new CLI and server/web #3429

Closed sethbaird01 closed 1 year ago

sethbaird01 commented 1 year ago

The bug

Server and web do not support .tif files while new CLI does. This causes it to upload such unsupported files resulting in ERR_BAD_REQUEST.

Error during upload: image1 image2

Diff between types listed in web/src/lib/utils/file-uploader.ts and server/src/domain/asset/asset.service.spec.ts diff

Could be fixed by changing line 12 in CLI's supported files from const tiff = ['tif', 'tiff']; to const tiff = ['tiff']; https://github.com/immich-app/immich/blob/1c5926553a7fba7a6eaf24be63181a61e6b763d7/cli/src/cores/constants.ts#L12

I tried this locally and the upload proceeded without issue. Not sure if this would pass tests though, since ".tif" is mentioned in the spec file cli/src/services/crawl.service.spec.ts

The OS that Immich Server is running on

TrueNAS 22.12.3.2

Version of Immich Server

1.69.0

Version of Immich Mobile App

N/A

Platform with the issue

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

1. Login to the server through new CLI
2. Upload a .tif file or a folder containing one
3. Error

Additional information

No response

alextran1502 commented 1 year ago

Hello, what version of the CLI are you running?

Ah we talked about this in Discord

etnoy commented 1 year ago

For reference, it's the new cli version in the main repo.

Thanks for a really nice writeup, we should be able to fix this quickly!