C-Command Software Forum

".bz2" extension added to .dmg downloads

Hi,

I’ve received a few reports of users who found, after downloading a .dmg image, that the browser had added the extension .bz2. Consequently the file would fail to open.

The .dmg was produced in DropDMG as a bzip2 compressed disk image. I’m not sure the problem lies with DropDMG, but this seems like a good place to start investigating. Has anyone received similar reports? Does anyone know why this may be happening and what can be done to prevent this from happening?

Just to be clear I should add that (probably) in most cases the download from our server works without problems.

Thanks,
António

One other DropDMG user reported something like this a few weeks ago. The problem seems to be confined to recent versions of Safari. It’s as if Safari looks at the beginning of the file, thinks it looks like a .bz2 file, and adds the extension. Personally, I think this is a bug in Safari.

The easiest workaround is to use a zlib-compressed image instead.

Or, you could try changing the MIME types on your server so that Safari knows the file is a disk image. If you have Apache, this could be done by adding the line:

AddType application/x-apple-diskimage .dmg

to your .htaccess file.

Thanks Michael,

I’ll try the .htaccess option first, since I’d rather maintain the more compact image. If that doesn’t work I’ll switch to the zlib-compressed image

António

For the record, here’s Apple’s knowledge base page about this.

Thanks, it looks like adding the MIME type to the server settings did the trick.

How to use Apache?