Skip to content

Conversation

@jinxuan-owyong
Copy link
Contributor

This PR resolves #15111

Due to a lack of permissions by the browser (Brave) which was installed via Flatpak, attempting to upload files through drag and drop resulted in zero-byte files being referenced.

file-uploader.ts:150 Error calculating sha1 file=DSC_0705.JPG) NotFoundError: A requested file or directory could not be found at the time an operation was processed.

The error counter was not incremented since the above error was not thrown. Despite this being addressed, uploadAssetsStore.updateItem did not update the upload asset preview state successfully, which hints that a mismatched deviceAssetId was used.

assetFile.lastModified seems to evaluate to a different value when logged in succession. This resulted in a different deviceAssetId used before and during the execution of fileUploader.

    if (extensions.some((extension) => name.endsWith(extension))) {
      uploadAssetsStore.addItem({ id: getDeviceAssetId(file), file, albumId });
      promises.push(uploadExecutionQueue.addTask(() => fileUploader(file, albumId, assetId)));
    }

Addressing the above issues allowed the upload failure to be properly displayed (see first vs second upload)

Screenshot from 2025-01-07 20-08-43

@alextran1502 alextran1502 enabled auto-merge (squash) January 12, 2025 04:16
@alextran1502 alextran1502 merged commit abf5b0a into immich-app:main Jan 12, 2025
33 checks passed
yosit pushed a commit to yosit/immich that referenced this pull request Jan 13, 2025
arctic-foxtato pushed a commit to arctic-foxtato/immich that referenced this pull request Jan 14, 2025
vladd11 pushed a commit to vladd11/immich that referenced this pull request Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

duplicate images not marked as processed

3 participants