Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Changed mime library to mime ^3.0.0 and add custom mimes for raw images #76

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tetofonta
Copy link

Given #47, the problem relied on in the fact that mime-types does not recognize raw photo formats (.nef for Nikon, probably more of them for other brands) and so those won't be uploaded.

My solution is to migrate from mime-types to mime to be able to use the ability to define custom mime types.
Because of that, all the non-default types are placed in an object associating their file extensions.

@bo0tzz
Copy link
Member

bo0tzz commented Apr 7, 2023

Thanks for the PR! A few thoughts:

  • We're looking to move all the mimetype checks and such to the server (Pull supported mimetypes from the server rather than having own local list #27), so I'm not too keen to add more edge cases here.
  • I think we should be careful about using a different mimetype lib in the CLI vs in the server
  • That --regex flag should at least be a separate PR
  • I think instead of filtering like --regex built in to the CLI, a better option would be something like --files-from-stdin, so the CLI can be used with standard linux utilities: find . -name "FOO_*" | immich --files-from-stdin

@alextran1502 want to make sure you see this, I think you don't get pings for new CLI PRs.

@ClumsyAdmin
Copy link

Just gonna note here and say that this PR successfully uploaded all my NEF photos but it seems that they aren't being properly rendered by immich (very low res jpg is shown) even on the latest immich update, so it seems there has to be more done on immich's side.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants