1

I'm creating a web app that has a list of several .dwg files (These are AutoCAD drawings FYI).

I have an image of a .dwg icon that when clicked is supposed to download the .dwg file. This works in every other browser except IE 10. IE 10 just displays a blank page when the link is clicked, and the url displayed is that of the correct .dwg file. I'm assuming IE 10 is trying to open and display this file much like it would a .pdf, but I'm not certain of this.

I'm using xampp to access the page, and I've tried configuring the .htaccess file to do a force download of .dwg files but to no avail. My .htaccess file is below. I'm new to configuring .htaccess files, but from what I've been reading this is the proper way to do a force download.

AddType application/acad .dwg 
AddType application/octet-stream .dwg
#Note that this is my entire .htaccess file

I tried this without the "application/acad .dwg" line at first, then I tried adding the MIME type but that did not work either.

I think it is worth noting that, as a test, I tried to force download .pdfs using the method above. This did not work either.

So I also tried looking in the httpd.conf file to see if there was a module that was commented out I could use, however, the instructions in the file told me not to mess with anything unless I knew what I was doing. I'm pretty new to this, so I looked through the modules for something obvious but couldn't find anything.

So my question is: How do I get these files do download in IE 10?

Other things to note:

  1. The files are downloaded by every other browser I've tried. (I have access to a machine with IE 8 and even that downloads the files)

  2. I do not have any browser extensions from Autodesk that would interfere with this. (The only non-out-of-the-box extension I have is avast! WebRep, however, this is on all other browsers as well.)

  3. All .dwg files are not corrupted and perform normally.

  4. Probably most importantly, my .htaccess file is working and is recognized. To test this I typed in junk text, saved it, then received a 500 error when I tried to reload the page.

  • Is it possible that it is a IE10 only configuration or setting? Even if you don't have extensions in the browser, you should try to check the standard behaviour of IE10 for DWG files. For example, Chrome doesn't need extensions or plugins to handle some mimetypes, ie, PDF... – Joum Jul 03 '13 at 13:37
  • Also, have you tried it in a computer with IE10 and _without_ AutoCAD installed? It could be this situation: http://www.cadtutor.net/forum/showthread.php?10355-DWG-in-Internet-Explorer – Joum Jul 03 '13 at 13:43
  • If it is then it would be set by default, then I would like to override it if possible. My users would have the same setting then. – krugmeister65 Jul 03 '13 at 13:46
  • I'm not so sure if code coming from the server can _override_ a computer's OS specification that easily... – Joum Jul 03 '13 at 13:50
  • Joum- I don't have a computer without AutoCAD, but AutoCAD is set as the default program for opening .dwgs – krugmeister65 Jul 03 '13 at 13:53
  • Then I would suggest trying to adapt this to DWG instead of images: http://www.webdeveloper.com/forum/showthread.php?145686-force-image-to-download-not-to-display-in-browser – Joum Jul 03 '13 at 13:59
  • Better yet - to get you started: http://stackoverflow.com/questions/6794255/html-download-a-pdf-file-instead-of-opening-them-in-browser-when-clicked – Joum Jul 03 '13 at 14:03
  • Thank you for the help. Reading through your last link I noticed someone that said my .htaccess approach only works with Linux hosting and not Windows. So, of course, I'm using Windows hosting. I'll go ahead and try the PHP example and see how that works. Thanks again. – krugmeister65 Jul 03 '13 at 14:16

0 Answers0