| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 102600 | 2009-08-25 11:09:00 | Apache MIME Types - Confused | WarNox (8772) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 804170 | 2009-08-25 11:09:00 | Hey! On my webserver, if I put a .jpg file in a directory I can access it fine through a web browser. ie. the picture displays in the browser. On the other hand, if I put a .bmp file in a directory the file downloads, it does not display. I figure this is to do with MIME types. I tried adding: AddType image/bmp .bmp to: /etc/apache2/apache2.conf /etc/apache2/httpd.conf But neither did anything. I found the current MIME types file in: /etc/mime.types and that file already has an entry for 'bmp' files: image/x-ms-bmp bmp So I'm not sure why it isn't working. Anyone have any idea what the problem is? Thanks, Gregor |
WarNox (8772) | ||
| 804171 | 2009-08-25 21:21:00 | So you can see it download but not see the image? what web browser are you using? Thanks |
Ross Burgess (15193) | ||
| 804172 | 2009-08-25 23:29:00 | Yeah the image will download rather than display in the browser. Happens with any browser I use, IE, Chrome etc etc I need to somehow tell Apache to display the image in the browser rather than downloading it. |
WarNox (8772) | ||
| 804173 | 2009-08-26 00:25:00 | Just to state the obvious. BMP is large and cumbersome why not convert the format? | DeSade (984) | ||
| 804174 | 2009-08-26 02:16:00 | That's not the point :) I can convert the file and that works but why doesn't .bmp work. I do not want to work with BMPs but would like to know how to fix the issue regardless. | WarNox (8772) | ||
| 804175 | 2009-08-26 05:09:00 | Can you please post a dump of the headers the server is sending? If you don't know how to do this, a public link to the image will suffice - I can grab them from that. |
Erayd (23) | ||
| 804176 | 2009-08-26 10:39:00 | PM sent. | WarNox (8772) | ||
| 804177 | 2009-08-26 10:48:00 | Request headers: GET /example.bmp HTTP/1.1 User-Agent: Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.2.15 Version/10.10 Host: example.com Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 Accept-Language: en Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1 Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0 Cache-Control: no-cache Connection: Keep-Alive, TE TE: deflate, gzip, chunked, identity, trailers Response headers: HTTP/1.1 200 OK Date: Wed, 26 Aug 2009 09:42:05 GMT Server: Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.2 with Suhosin-Patch Last-Modified: Wed, 26 Aug 2009 09:34:26 GMT ETag: "4de23-1dfb36-47208282a2c80" Accept-Ranges: bytes Content-Length: 1964854 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: image/x-ms-bmp |
Erayd (23) | ||
| 804178 | 2009-08-26 11:00:00 | Sorry, I don't get it, what does that tell me? I can see in the GET request that there is the content type of image/x-ms-bmp, so why does the image still download rather than display? Thanks again! |
WarNox (8772) | ||
| 804179 | 2009-08-26 11:05:00 | Apologies for the delay in this reply - TelstraClear had some cable outages in my area this evening, and my net access dropped right after posting the headers. That all looks pretty good. While you're using a nonstandard mimetype (the standard one is image/bmp), the one you have is pretty commonly accepted. I have also tested in both Opera and Firefox - both are quite happy to display the image. Are you sure the problem isn't with the system you're trying to view it on? Which browsers are you testing in? Can you view bitmap images on other sites? |
Erayd (23) | ||
| 1 2 | |||||