How are filename collisions handled?
When filenames are normalized using the storage template, how does immich handle different files that result in the same name?
Based upon
storage-template.core.ts
, it seems the strategy is to append +<n>
to the name (before the extension) where <n>
is an integer
- https://github.com/immich-app/immich/blob/main/server/libs/domain/src/storage-template/storage-template.core.ts#L80-L90
Is this a correct understanding of the behavior?
Example:
Consider a scenario where the storage template chosen is Year/Year-Month-Day.extension
and 2 different files (both .jpg
) from the same day (2023-05-20
) are uploaded. Would this result in the following files?
- 2023/2023-05-20.jpg
- 2023/2023-05-20+1.jpg
Would these types of collisions cause any issues / would it be preferable to choose a storage template that guaranteed uniqueness of resolved file names?1 Reply
Correct. That shouldn't cause any issues, if it does please let us know