btw... i don't understand how and why the string contains not the native filedata. The string-encode needs regular only for displaying the content, and not for accessing the bytes in it.
So, when i read the file into a string and send it over the network, then i receive not the raw stuff. I'm shure, that this way is a wrong way to handel the data inside a string.