I am new to socket programming and am trying to send a file from a client to server. I can successfully do this, but I have my code set up to where it should grab and save x files based on how many gets sent. Instead, however, it just reads all the files I send and takes all its contents and puts it into one file. For example, on the client side if I had 2 files named one.txt and two.txt and each had the following contents one, two consecutivley I would want to send that to a server and the server save it on its side as two separate files with the same contents. Instead, what is happening is a file is being made and inside it will have one and two on a newline.
-------------------------
Here is the server: SERVER
Here is the client: CLIENT[url=https://pastebin.com/F1n1TNLM][/url]
TLDR: I am using Python 3.6 and running this in a Linux environment (Mint). I am just trying to make the 2 files I send save as 2 separate files instead of one
-------------------------
Here is the server: SERVER
Here is the client: CLIENT[url=https://pastebin.com/F1n1TNLM][/url]
TLDR: I am using Python 3.6 and running this in a Linux environment (Mint). I am just trying to make the 2 files I send save as 2 separate files instead of one


Bitcoin: