From: Phil McGuinness on
Hpeter

Basically the same code

InternetReadFile( ) to InternetWriteFile()

You are reading locally and writing via Internetwrite file...

Phil
---


From: hpeter on
Phil

The error I had was due to not having "write" privileges in the server
folder where I wanted my files to be uploaded.

> Basically the same code
>
> InternetReadFile( ) to InternetWriteFile()
>
> You are reading locally and writing via Internetwrite file...
>
Not quite the same. cHTTP does not use HttpSendRequestEx which is
required for InternetWriteFile in order to send chunks of data.

The solution offered by Norbert is via POST method which sends the
entire file and has limitations with BIG files.

Hernando

From: Phil McGuinness on
Hpeter

From memory this is why I use FTP for upload and FTP or HTTP for downloads..

Phil
---


From: hpeter on
Phil

> From memory this is why I use FTP for upload and FTP or HTTP for downloads..

I have done that and it works. But as I stated in my post, my client
(a big corporation) wants to use exclusively HTTP due to special proxy
and firewall settings that cannot be bypassed using FTP classes.

Hernando

From: GSchaller on
Hernando.

> I have done that and it works. But as I stated in my post, my client
> (a big corporation) wants to use exclusively HTTP due to special proxy
> and firewall settings that cannot be bypassed using FTP classes.

With all due respect, that is corporate rubbish!

How is it that they can come to you and effectively say: "We demand to
use an inferior and inappropriate mechanism to do file transfers with" ?
There is absolutely no big deal opening up a port to use FTP with,
securing it with user name and password and isolating it with an active
directory account and user rights. It's a 2 minute job.

If they are prepared to allow file download with HTTP then they surely
must allow proper FTP. It is much safer!

It isn't the FTP classes which have to bypass anything. You can set any
port or server address for your FTP connection. Their firewall proxy
merely sets a rule to manage that port and access. The port number can
be anything. This is really simple stuff.

You will always run into complexities tyring to use HTTP for file
download. If it's a big corporation then get them to do the big
corporation thing and open up the correct ports and rules in the proxy.
Honestly, this is just so not a big deal for them!

Geoff