# file de-duplication not working as expected

**URL:** <https://community.hubspot.com/t/file-de-duplication-not-working-as-expected/108369>\
**Category:** APIs & Integrations\
**Tags:** starter\
**Created:** [May 31, 2024, 8:05am UTC](https://community.hubspot.com/t/file-de-duplication-not-working-as-expected/108369 "2024-05-31T08:05:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Georg\_1](https://avatars.discourse-cdn.com/v4/letter/g/b2d939/32.png) [@Georg\_1](https://community.hubspot.com/u/Georg_1)\
**Post date:** [May 31, 2024, 8:05am UTC](https://community.hubspot.com/t/file-de-duplication-not-working-as-expected/108369/1 "2024-05-31T08:05:42Z")

</div>

Hello,

at the moment we prepare the change from our old CRM system to HubSpot. For that I have to import a lot of notes with attachments into HubSpot. I use the API. Just now I noticed a strange behavior in connection with uploading files. The API-call shall upload a new file unless it exists already in the selected folder. In that case the call shall return the file-ID of the existing file (option “RETURN\_EXISTING”). In my test this worked well. But now I have a bunch of files that seems to confuse the API.

Already present in HubSpot is this file:

“lieferschein ABC 20e21ec6-e2dd-4c67-a908-a28e4f5117c7.doc”

Now I try to upload another file:

“lieferschein ABC 4056bb40-2eb3-467e-8a9d-4130aa057f57.doc”

This is obviously a different file but the API is returning the file-ID of the already existing file. Why do I get this result?

---

<div class="post-metadata">

**Author:** ![Humashankar](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/humashankar/32/30856_2.png) [@Humashankar](https://community.hubspot.com/u/Humashankar)\
**Post date:** [May 31, 2024, 11:06pm UTC](https://community.hubspot.com/t/file-de-duplication-not-working-as-expected/108369/2 "2024-05-31T23:06:23Z")

</div>

Hi [@Georg\_](https://community.hubspot.com/t5/user/viewprofilepage/user-id/735108)

Test the API’s behavior by uploading a file with a specifically different name to isolate the issue.

This could be due to the hashing algorithm used for de-duplication, which might be causing the similar filenames (‘lieferschein ABC’) also the file content in addition to generate the same hash value, resulting in a conflict and the return of the existing file ID.

**Hope this helps - Happy to help further!!**  
**Thank you very much and have a great one!**  
**Warm regards**
