You build an HTTP request as described in fileupload.txt (which should refer you to rfc1867) and you POST it to http://<server>/service/upload?fmt=raw
The request would look similiar to this:
Of course, you should create an appropriate mime-boundary, insert the correct content-length and insert the appropriate data. You should set the content-type and transfer encoding appropriately as well.
POST /service/upload HTTP/1.1
Content-Type: multipart/form-data; boundary=<MIME_BOUNDARY>
Content-Disposition: form-data; name="requestId"
Content-Disposition: form-data; name="item-name"; filename="file.name"