All the contents inside the file I shared got deleted

My setup consists of three devices (1 laptop (main server), a laptop, and my phone (Android)), I was trying to share a file from my laptop, not the main server, to my other two devices, and for some reason all the contents of the file I was using were deleted.

That’s unfortunate, I’m sorry to hear that. Unfortunately, it’s hard to diagnose after the fact without a lot more details on precisely what you did, and precisely what happened.