Re: .sit download problems

From: Date: Sun, 14 Mar 2004 15:09:33 +0000
Subject: Re: .sit download problems
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-180391@lists.php.net to get a copy of this message
Not sure if this will solve your problem, but try tossing in a Content-Length header so the browser knows how long of a file to look for.
This helped - I can see the correct file length now in the download window. But now the problem is a little different. I can download .zip files with any browser, but .sit files do not decompress (Safari, IE6, anything). The whole file is downloaded correctly, but gives a Stuffit "damaged archive" error. Any thoughts? Here is my code now: header('Content-Type: '.$file_row['content_type']); header('Content-Disposition: filename="'.$file_row["filename"].'"'); $size = filesize('../../store/files/'.$file_row['filename']); header('Content-Length: '.$size); header('Content-Transfer-Encoding: base64'); readfile('../../store/files/'.$file_row['filename']); Assume that filename = 'myarchive.sit' and content_type is 'application/sit'

« previous php.general (#180391) next »