Duplicates in attachment naming

Any critical bugs will be fixed within 24-48 hours.
Post Reply
thielem
Posts: 22
Joined: 12 Mar 2023, 22:30
Name: Moritz Thiele
Location: Germany, Berlin

Duplicates in attachment naming

Post by thielem »

As I understand it, attachments are referenced in the database by their original name, prefixed by the unix timestamp of their creation time.
SCR-20240319-ofiv.png
We have a workflow where our office scans all incoming invoices. The scan is sent to an email and the email is integrated with Rukovoditel. This automatically creates an item in the entity for invoices. However, as the office tends to scan all the invoices at once in the morning, and emails are only fetched every minute or so, it happens that two attachments get the same name.
SCR-20240319-ohnu.png
This leads one of the files being overwritten and if one of the entries is modified, sometimes the files just disappear.
SCR-20240319-oiir.png
SCR-20240319-oiir.png (11.49 KiB) Viewed 87 times
I guess it would be prudent to assign a unique identifier to each attachment that is not solely dependent on the creation timestamp (UUID?)
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Duplicates in attachment naming

Post by support »

In this case prefixed by the unix timestamp is no OK, but I can't change how app works. So just add invoice number to filename to make it unique.
Post Reply