Questions tagged [mime]
62 questions
36
votes
5 answers
Why are docx, xlsx, pptx downloading from webserver as zip files?
On my Apache server I have stored several docx, xlsx pptx files.
Some client browsers think that theses are regular zip files and change the file extension when downloading. How do I make it not do that anymore.
(Using Ubuntu server)
daveilers
- 609
- 1
- 5
- 8
18
votes
3 answers
Making libmagic/file detect .docx files
As seen elsewhere, docx, xlsx and pttx are ZIPs. When uploading them to my web application, file (via libmagic andpython-magic) detects them as being ZIP.
I store the contents of the file as a blob in the database, but naturally I don't want to…
Jonatan Littke
- 361
- 1
- 3
- 8
12
votes
2 answers
nginx mime types and gzip
Nginx allows you to map file extensions to mime types. As the documentation says, it even comes with a pre built list of mime types (pasted at the end of the question).
I've always trusted this list, and things work great, but now I've noticed…
tompave
- 564
- 3
- 5
- 14
11
votes
3 answers
How to serve unknown file types from IIS 7
Is there a way to serve unknown file types in IIS 7?
I only want to do this for a single directory where execution is turned off and everything will be served as a static file.
As it is now, I have to add each file extension that I want to serve as…
Ronnie Overby
- 681
- 2
- 12
- 24
11
votes
1 answer
Apache delivering CSS and JS files, but browsers don't render them
A webpage is being hosted by apache2, CentOS 6.2.
It Gets HTML, CSS, JS files ok to the client side. But CSS and JS don't render, What can be hapenning?
Since they should run 100% on client side...
jacktrades
- 612
- 3
- 8
- 15
11
votes
3 answers
Does the presence of a Content-ID header in an email MIME mean that the attachment must be embedded?
Two different third-party email products we have are reacting differently to the presence of a content-id header in the MIME source of an email. This is resulting in an inconsistent user experience that we're trying to resolve.
Here's an example:…
Mike B
- 11,570
- 42
- 106
- 165
9
votes
3 answers
nginx, x-accel-redirect and mime types
In my nginx 0.8.34 setup I'm using the X-Accel-Redirect feature to control file downloads in the application code while not having the application handle the download itself.
After much pain this now basically works except nginx always returns the…
Tomas Kohl
- 193
- 1
- 5
7
votes
3 answers
Subversion - Can I set auto-props on the server side?
I'm maintaining a SVN server and on user needs to commit many adobe illustrator files (ie *.ai). I can use the auto-props in their config to set it as a binary file so that it won't be in the mailing list commits. However I'd like to make this as…
Amandasaurus
- 30,211
- 62
- 184
- 246
6
votes
5 answers
Why are MIME types needed if we can identify file types by their extensions?
If people's computers can decide what to do with files based on their extensions (.pdf, .mp3, .docx, .dotx, etc.), why do web servers and email apps need to also specify a MIME type?
I can see this being useful if you want to deliver a file in a way…
RexE
- 369
- 1
- 5
- 11
5
votes
5 answers
Making Apache recognize MIME type of files without extension
I have some old HTML files that were created elsewhere by someone else. Many of them don't, for some reason, have the .html extension on them. I don't want to have to change them if possible, but for some reason Apache can't seem to do any MIME…
supercheetah
- 223
- 1
- 2
- 9
5
votes
2 answers
Delivery status notification, invalid header: bad MIME
Each email that is generated by the shop web application is returning:
Delivery status notification, invalid header: bad MIME
From looking at the error message it look like it is complaining about the HTML that is in the email although when viewing…
John Magnolia
- 1,613
- 6
- 27
- 44
5
votes
1 answer
What MIME type should I put for Windows shortcut file (.URL)
If I want to have a Windows shortcut file (foo.URL) to be saved for the users, what MIME type should I assign for it?
Default text/plain causes Windows to suggest it to be saved with .txt added as default.
With googling, I've found some…
Touko
- 241
- 3
- 7
4
votes
2 answers
Is there a command line MIME extractor shipped with RHEL 5?
It looks like mpack is not shipped with RHEL. Is there a command line MIME extractor (i.e. something that can be used from a shell script) shipped with RHEL 5 that does not require installing a third party package or building from source?
The…
ConcernedOfTunbridgeWells
- 8,810
- 2
- 31
- 52
3
votes
2 answers
Exchange 2003 automatically converts text/plain emails to text/html for IMAP retrieval
When accessing an Exchange 2003 server via IMAP, emails that were sent as text/plain (and ones that had no MIME encoding specified at all) get automatically converted to multipart/alternative with the original text/plain body and a text/html body. …
wfaulk
- 6,828
- 7
- 45
- 75
3
votes
3 answers
Set MIME type of PHP generated JavaScript file
I have a dynamically created .js file by PHP. For this to work I added the following to an Apache .htaccess file:
AddHandler application/x-httpd-php .js
AddType application/javascript .js
But the .js files are sent with the MIME type text/html.
How…
pimvdb
- 147
- 1
- 2
- 7