rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: ftcove on January 03, 2011, 10:53:14 AM

Title: upload text file via POST request
Post by: ftcove on January 03, 2011, 10:53:14 AM


Hi,

I am trying to upload a text file to the HFS server (2.3 (built 270)). I am using a VB6.0 program
which transmits the following data via Winsock:
 

POST / HTTP/1.1
Host: 192.168.0.2
Content-Type: multipart/form-data, boundary=Y0UreIzL8NdSLWzPHPSDjdPKnDd9ZLyk
Content-Length: 191

--Y0UreIzL8NdSLWzPHPSDjdPKnDd9ZLyk
Content-Disposition: form-data; name="temp.txt"; filename="temp.txt"
Content-Type: text/plain

12341 12342 12343

--Y0UreIzL8NdSLWzPHPSDjdPKnDd9ZLyk--


On the server side I see the following information in the log window.

11:12:22 AM 192.168.0.1:4309 Got 328 bytes
11:12:22 AM 192.168.0.1:4309 Uploading temp.txt
11:12:22 AM 192.168.0.1:4309 Requested POST /
11:12:22 AM 192.168.0.1:4309 Request dump
> POST / HTTP/1.1
> Host: 192.168.0.2
> Content-Type: multipart/form-data, boundary=1wXe4awsh3Pdwou74D4QYXvjnKMt2e16
> Content-Length: 191
11:12:23 AM 192.168.0.1:4309 Served 7.97 K

When look in the folder where “temp.txt” is stored, only an empty file is stored.
Can someone give me some advise/help?

Best regards,
Foort
Title: Re: upload text file via POST request
Post by: rejetto on January 11, 2011, 05:29:17 PM
did you bind the root to a real folder?