I'm having a strange issue with a static file download. In the static folder I have a file with an xlsm extension, which I want users to be able to download via a hyperlink, which is created in the controller like so:
    report_file_name = "DESIGN_SPEND_VS_ESTIMATE.xlsm"
    ...
            DIV(P(A('Download report: %s' % report_file_name,
                    _href=URL(r=request,c='static/downloads',f=report_file_name)))),
    ...
This creates a download link which works fine in Google chrome, Fine in IE9, but not in IE8, where it tries to download the file with a .xlsx extension, which Excel cannot open, so it looks like I'm serving a corrupt file, which I'm not.
I've read up on this and aside from the really useful advice of telling me not to use IE8 (the default browser in my client's, the only pointer I get is that it may be to do with MIME type sniffing in IE, and that I need to change .htaccess settings on the server, which is equally useless to me as I might not always be in control of the server. As it turns out, this app runs on rocket on Windows, and there's nothing in the rocket docs about mime types, and I don't know if setting a .htaccess would even work on Windows.
Any thoughts?
--
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/uENzWdeuy2c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
| application/vnd.ms-excel.sheet.macroEnabled.12 |