I've got the server set up, the upload works in browsers, now, I've tried sending the file to server but since in the file there are null characters that I cannot append to string - only up to that point, the rest gets cut off...
from what I read it is supposed to be
request.setField("Content-Type", "multipart/form-data");
this however gives this error: Missing boundary in multipart/form-data POST data on line 0
also the content length on page equals to ~20 characters, from which 16 are the "file=" and "&fname=blah", so there are only 4 characters left for the file.
Needles to say, file is not uploaded.
edit: after adding the ";boundary=(size of file+16)" the content length is now matching, still the file is not uploaded.