brock

Displaying JPG files over a Mapped Drive

09 Sep 2008

I don't think that most people would have guessed this, but if the images you are going to display on your website are located on a mapped network drive, Apache needs to be modified in order for the image to display. If you mapped a network drive but it only displays the text of the image in the browser, you need to change the following inside of your Apache Directives:

<Directory "/path-to-mapped-drive">
EnableSendfile Off
</Directory>

So, this may not make a lot of sense unless you have experienced the problem firsthand; but if you open the browser window, expecting to see a jpg, and instead you see something like this:

http://media.brockangelo.com/wp-content/uploads/mnt/2008/08/sample.jpg

Then you need to set EnableSendfile to "Off" inside your Apache Directives.