[PHP] Re: Totally weird behavior trying to download a Mac DMG file

2009-06-16 Thread tedd

At 1:05 PM -0500 6/16/09, Shawn McKenzie wrote:


 > WTF?




Sounds like a Mac / Safari "feature".



Yeah, like the most recent Safari update that shows the contents of 
Safari as an open folder on my desktop. I have to put the folder away 
each time, but when I restart it's always there. I can't wait for the 
next update so Apple can fix this bonehead error.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Totally weird behavior trying to download a Mac DMG file

2009-06-16 Thread Shawn McKenzie
Brian Dunning wrote:
> So I've added a product to my online store that's in .DMG format. Most
> of the other files are ZIP or PDF. When someone completes a purchase, it
> downloads the file to them, and this works great:
> 
> header('Content-Type: application/octet-stream');
> header('Content-Disposition: attachment;
> filename="'.$file_row["filename"].'"');
> $size = filesize('../../store/files/'.$file_row['filename']);
> header('Content-Length: '.$size);
> readfile('../../store/files/'.$file_row['filename']);
> 
> So I have my DMG file. I've verified that it automounts and behaves
> friendly. If you do a direct download, it mounts on the desktop
> perfectly, and there's all the stuff inside.
> 
> However, when I complete a test purchase and download using the above
> code, the DMG file downloads, but then it mounts; the contents are
> copied into the Downloads folder; the image unmounts; and then deletes.
> All the contents are delivered, but not in a desirable way. You can see
> the status change in the Downloads window:
> 
> Mounting the image
> Copying the image
> Unmounting the image
> Cleaning up
> 
> WTF?
> 
> 
Sounds like a Mac / Safari "feature".

-- 
Thanks!
-Shawn
http://www.spidean.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php