ImmichI
Immich3y ago
krueg

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
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?
Was this page helpful?