What is a file ?
It’s just a binary blob. So just send the content of the file and your file is sent.
If I can change sendData in rw.WriteString(fmt.Sprintf(“%s\n”, sendData)) with my file, does it work?
Idk, try it !
Even if does that is very dumb because you are loading the complete file in memory and then copying a bunch of time before finaly sending it.