Discussion:
Uploading of binary files..
(too old to reply)
Chizl
2008-02-13 23:07:30 UTC
Permalink
VC6..

I've posted the code... Just a test Win32 app..
http://www.chizl.com/aspuploaded/WinHTTP.cpp

I have ASPUpload on the server side and the code for it has been tested so I
know the server side works fine..

I'm receiving no errors, everything seems to do what it supposed to do
through IIS, however the server never saves the file.. Based on the code,
I've added a totalbytes sent and it shows all data was sent.. I'm not seeing
where the problem is..

Here is what the post looks like at the server side. I've trimmed the
binary data so I'm not posting a bunch of symbols in this group, but all
1234 bytes are there.

----------
POST /DER/Upload.asp HTTP/1.1
Content-Length: 1410
Cache-Control: no-cache
Content-Type: multipart/form-data; boundary=Xu02=$; Charset=UTF-8
User-Agent: A WinHTTP Example Program/1.0
Host: 127.0.0.1:5000
Connection: Keep-Alive

--Xu02=$
Content-Type: application/octet-stream
Content-Disposition: multipart/form-data; name="PostData";
filename="1234567890.zip"
Content-Length: 1234

PK  @tK8#?TT Y
 1234567890.cfg?V?n?6}

--Xu02=$--
----------
Chizl
2008-02-14 15:23:12 UTC
Permalink
Is this really that hard? Seems only a few companies have actually done
this and none of them want to share. This has to be the first time I've
searched for how to do something on the web and get very little back. I
feel I'm on the edge, but there is something little missing. Any direction
would be greatly appreciated..
Post by Chizl
VC6..
I've posted the code... Just a test Win32 app..
http://www.chizl.com/aspuploaded/WinHTTP.cpp
I have ASPUpload on the server side and the code for it has been tested so
I know the server side works fine..
I'm receiving no errors, everything seems to do what it supposed to do
through IIS, however the server never saves the file.. Based on the
code, I've added a totalbytes sent and it shows all data was sent.. I'm
not seeing where the problem is..
Here is what the post looks like at the server side. I've trimmed the
binary data so I'm not posting a bunch of symbols in this group, but all
1234 bytes are there.
----------
POST /DER/Upload.asp HTTP/1.1
Content-Length: 1410
Cache-Control: no-cache
Content-Type: multipart/form-data; boundary=Xu02=$; Charset=UTF-8
User-Agent: A WinHTTP Example Program/1.0
Host: 127.0.0.1:5000
Connection: Keep-Alive
--Xu02=$
Content-Type: application/octet-stream
Content-Disposition: multipart/form-data; name="PostData";
filename="1234567890.zip"
Content-Length: 1234
 1234567890.cfg?V?n?6}
--Xu02=$--
----------
Lucille M. Johnson
2008-04-18 20:24:12 UTC
Permalink
Post by Chizl
VC6..
I've posted the code... Just a test Win32 app..
http://www.chizl.com/aspuploaded/WinHTTP.cpp
I have ASPUpload on the server side and the code for it has been tested so
I know the server side works fine..
I'm receiving no errors, everything seems to do what it supposed to do
through IIS, however the server never saves the file.. Based on the
code, I've added a totalbytes sent and it shows all data was sent.. I'm
not seeing where the problem is..
Here is what the post looks like at the server side. I've trimmed the
binary data so I'm not posting a bunch of symbols in this group, but all
1234 bytes are there.
----------
POST /DER/Upload.asp HTTP/1.1
Content-Length: 1410
Cache-Control: no-cache
Content-Type: multipart/form-data; boundary=Xu02=$; Charset=UTF-8
User-Agent: A WinHTTP Example Program/1.0
Host: 127.0.0.1:5000
Connection: Keep-Alive
--Xu02=$
Content-Type: application/octet-stream
Content-Disposition: multipart/form-data; name="PostData";
filename="1234567890.zip"
Content-Length: 1234
 1234567890.cfg?V?n?6}
--Xu02=$--
----------
Who are you and what are you doing on my computer?
Loading...