471,092 Members | 1,238 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,092 software developers and data experts.

Repost - InetTransferLib Http download problem with zip files

Reposting this message from last week since I have not had a reply so
far. Hopefully someone will have an idea?
---

I've been using Dev's fantastic InetTransferLib to upload and download
files via ftp. Now I'm using the http procedures to have my application
download zip files from my website. Although the download process works
OK, it adds a few bytes to the file during the download, so a 46k file
becomes 52k. I can still open the file using Winzip, but cannot open it
using my active X extraction system (ActiveXZip from www.hdse.com). I
get an error 'Bad file format'. This is effectively stopping me using
the ActiveX unzipping process which I need to build into my application
to allow clients to download and install files from my website.

I've tried the same process using ftp and the same thing happens. If I
download using a browser, the file is transferred with no extra bytes
and unzips perfectly using Winzip or ActiveXZip.

Anyone know what could be happening during the download to modify the
zip file? And how to fix it of course.

Owen Jenkins

Nov 13 '05 #1
1 2106
Looking at the code in the procedure WriteHTTPDataToFile in the HTTP class
the following line looks wrong to me

Call apiWriteFile(hFile, abytData(0), MAX_CHUNK, _
lngBytesWritten, 0&)

I think it should be

Call apiWriteFile(hFile, abytData(0), lngBytesRead, _
lngBytesWritten, 0&)


--
Terry Kreft
MVP Microsoft Access
"Owen Jenkins" <oj@healthbase.com.au> wrote in message
news:41***************@healthbase.com.au...
Reposting this message from last week since I have not had a reply so
far. Hopefully someone will have an idea?
---

I've been using Dev's fantastic InetTransferLib to upload and download
files via ftp. Now I'm using the http procedures to have my application
download zip files from my website. Although the download process works
OK, it adds a few bytes to the file during the download, so a 46k file
becomes 52k. I can still open the file using Winzip, but cannot open it
using my active X extraction system (ActiveXZip from www.hdse.com). I
get an error 'Bad file format'. This is effectively stopping me using
the ActiveX unzipping process which I need to build into my application
to allow clients to download and install files from my website.

I've tried the same process using ftp and the same thing happens. If I
download using a browser, the file is transferred with no extra bytes
and unzips perfectly using Winzip or ActiveXZip.

Anyone know what could be happening during the download to modify the
zip file? And how to fix it of course.

Owen Jenkins

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Owen Jenkins | last post: by
3 posts views Thread by Adam | last post: by
14 posts views Thread by Steve McLellan | last post: by
2 posts views Thread by Owen Jenkins | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.