Click to See Complete Forum and Search --> : Browser suggests wrong file type to open downloaded file


Knubbi
12-04-2008, 10:10 AM
We are maker of a software which uses proprietary file extension .pxp

Technically, our file format is based on a ZIP file.

If users download .pxp files from our webserver, the browser seems to scan the file type header and consequently falsely interpretes our files as a ZIP file and offers to open them in a ZIP program.

Is there any way to force the browser to offer our application to open downloaded .pxp files?

Would this need to be configured on the webserver or the local Windows installation?

Thanks for any help.

felgall
12-04-2008, 02:15 PM
It would need to be configured locally on the computer doing the download.

You need people to download and install your application first before they try to access the files that are to be associated with it. The program should set the file association during the install.

Knubbi
12-05-2008, 02:22 AM
We have done that already. The file association is working fine actually.

Charles
12-05-2008, 05:43 AM
Mr. felgall's suggestion will work with MSIE and if it doesn't then no, the file association isn't working by definition. What browser and platform is giving you trouble? If it's something other than MSIE then I would suggest it's your server that is guessing at the file type and incorrectly reporting it to the browser. You need to be sending a mime type header like "application/knubbi".

felgall
12-05-2008, 01:40 PM
We have done that already. The file association is working fine actually.

If the browser is handling the file incorrectly then you need to change the Content-Disposition to attachment so as to force the browser to offer the file for download rather than trying to process the file itself because it thinks it knows how to handle it.

Knubbi
12-10-2008, 09:25 AM
Strange. In FireFox and even in the oldie IE 6 everything works as expected.

It is only IE7 which fails as you can see in the video:
http://www.bartelsmedia.com/vid/tmp_ie6_vs_ie7.swf


The amazing thing is that the file which is residing in the IE 7 cache folder is actually intact! It seems that it is just not passed to the application properly when clicking on the link.

Any clue why it does not work?

Knubbi
12-11-2008, 05:41 AM
Just for the record. We solved the problem!

The problem is that IE7 locks the transmitted file too much time while handing it over to the target application.

We set a delay before loading the file in our application and this works nice.

Sorry for keeping you busy. I hope this information may at least help others who may face the same issue.