TCP is just sending bytes. It is up to the client and server to agree what the bytes mean.
You can use some well-known protocol, like HTTP or FTP, if you can find one that meets your needs. e.g. maybe use HTTP and use MIME types to identify the data.
Otherwise you can "roll your own", with each packet containing a header which tells the recipient how to handle the data.
It is all up to you.