Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Nov : Re: wininet: Replace existing file
| Subject: | Re: wininet: Replace existing file |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Mon, 5 Nov 2007 10:43:13 |
"Joe H" <joedotah@att.net> wrote in message
news:472f2513@newsgroups.borland.com...
> I'm using wininet functions to update a current versions list on my web
> site so that my software can implement a "check for upgrades" function.
> Unfortunately, this only seems to work when the file is not already on
> the site. In other words it won't let me replace the existing file.
Not all servers support the PUT command for uploads. Many use POST with an
"multipart/form-data" submission instead (if they support HTTP-based uploads
at all), or require external access such as through FTP. You need to talk
to your hosting provider about how to upload files to their system
correctly.
> I tried to see if there was a way to delete the file using some winInet
> http function but I could not see a way to do it.
There is a DELETE command in the HTTP protocol. But again, it depends on
the server's actual configuration whether it is supported or not. I don't
know very many systems that allow HHTP-based deletions.
> I was told several years ago by my Internet host (earthlink) that ftp
> access cannot access the main web site files but only an ftp folder
> on the site. Since I can do all of that using wsftp, I don't believe
> that's
> true but I'm not sure.
Changes are, the FTP server is really configured to access the same folders
that your website reads from.
Gambit