immich-app / immich

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

When uploading a folder with drag-and-drop only 100 entries are uploaded #14283

Open Yavanosta opened 23 hours ago

Yavanosta commented 23 hours ago

The bug

When using drag-and-drop to upload a folder to immich it actually uploads only first 100 photos.

  1. This code is used to get content of uploaded folder.
  2. However calling reader.readEntries only returns first 100 items (see this discussion for example)
  3. reader.readEntries needs to be called multiple times till it returns an empty array

The OS that Immich Server is running on

Ubuntu

Version of Immich Server

v1.120.2

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. Create a folder with more then 100 photos (ex 101)
  2. Upload it to immich web with drag and drop
  3. You see only 100 photos uploaded

Relevant log output

No response

Additional information

No response

bo0tzz commented 23 hours ago

If you're uploading a large amount of files, you should use the cli https://immich.app/docs/features/command-line-interface.

Yavanosta commented 23 hours ago

Tanks for the fast response!

I know about cli but still I see a huge problem here. First of all, 101 photo is not actually "large amount of files" from my perspective. Second of all the biggest problem is that the rest is SILENTLY ignored.

So I drag and dropped folder and expect that if immich shows "ok" status, then the folder is uploaded. However only 100 photos are uploaded.

Maybe i can notice it when I have like 1000 photos and only 100 is uploded but I run into a different case. I had a folder with subfolders and some subfolders have more then 100 photos.

So I have quite some photos uploaded but not all of them and it took me quite some time to understand what is going on.

If this limitation is intentional, immich should show a warning that some photos have not been uploaded.

But I'm almost certain its a bug and can be fixed with 5 lines of code.