Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Downloading ISO file

When i try to download iso file, it results in 404 page not found. The link in this instance is like:

http://www.domain.com/virtualDir/filename.iso

virtualDir points to a location on our file servers.

I don't want to read the binary array and then push it out as download since it is almost 600mb. I want the browser to handle this just like exes and zips.

What is the best way to handle this?

like image 293
learning... Avatar asked Jul 30 '13 22:07

learning...


1 Answers

I would imagine it is because IIS doesn't serve unknown file extensions. You need to add the MIME type to the overall IIS settings, or the web.config. As you asked for in the comment, I'd probably recommend placing it in the web.config since it doesn't require additional configuration from a sysadmin and everything is in one place.

<configuration>
    <system.webServer>
        <staticContent>
            <mimeMap fileExtension=".iso" mimeType="application/octet-stream" />
        </staticContent>
    </system.webServer>
</configuration> 
like image 73
Steven V Avatar answered Oct 09 '22 03:10

Steven V