I am wondering what the best option for sending a file would be.
I have to upload a cvs file to a server to be processed and then wait for the results of the process.
So far I convert the file to binary data like this:
let data = try Data(contentsOf: <URL>, options: .mappedIfSafe)
socket.write(data: data)
And it sends something, but I'm unsure how to handle that on the server side (Nodejs with websocket)
Is there another way to do this? I know using simple http methods I can send a file as it is, but I can't find a way with StarsCream.
Thanks in advance...