No, you're on completely the wrong track. The path of the file need never be sent to the server. The file itself is sent; the server doesn't somehow reach into the client's hard drive and pluck the file from the specified place.
You send POST data directly in the request. The request format is:
Code:
POST /path/to/file.php HTTP/1.1
Host: mysite.com
Content-Type: multipart/form-data; boundary=---------------------------15415454588765403441079621624
Content-Length: 254
-----------------------------15415454588765403441079621624
Content-Disposition: form-data; name="ufile"; filename="filename.fil"
Content-Type: application/octet-stream
Content goes here
-----------------------------15415454588765403441079621624--
That boundary can be anything. It's usually randomly generated. The lines are, of course, seperated by 13,10.
Which socket library are you using?
Bookmarks