Every file name should be unique if you want to avoid this error in the first place.
This happens because the two files get stored in the same location.
Teams send all the files you received via chat conversations to the same folder.
This is how the program works by design.
Maybe you uploaded one of the files from your rig.
And you shared the other file from OneDrive or another online storage service.
you could avoid getting this error by using a single source to upload your files.
Our suggestion is to use OneDrive to share files on Microsoft Teams.
By doing that, youll actually share the file stored in your OneDrive folder.
So, you wont duplicate it anywhere else.
Youll use a single source for your files with all the people enrolled in that chat group.
Of course, this also means giving them access to the respective file.
Rename the File
Another workaround is to simply rename the file.
see if the two files are one and the same.
If this is the case, you may not need to share the second file after all.
When this error pops up, Teams gives you three options.
There are also situations when Teams only gives you the option to replace the file.