Questions tagged [mime]

Multipurpose Internet Mail Extensions (MIME) is an Internet standard that extends the format of email to support text in character sets other than ASCII, non-text attachments, message bodies with multiple parts, and header information in non-ASCII character sets

Multipurpose Internet Mail Extensions (MIME) is an Internet standard that extends the format of email to support:

  • Text in character sets other than ASCII
  • Non-text attachments
  • Message bodies with multiple parts
  • Header information in non-ASCII character sets

MIME is specified in six linked RFC memoranda: RFC 2045, RFC 2046, RFC 2047, RFC 4288, RFC 4289 and RFC 2049, which together define the specifications. File name encoding is defined in .

1867 questions
1349
votes
3 answers

Proper MIME media type for PDF files

When working with PDFs, I've run across the MIME types application/pdf and application/x-pdf among others. Is there a difference between these two types, and if so what is it? Is one preferred over the other? I'm working on a web app which must…
friedo
  • 62,644
  • 16
  • 111
  • 180
522
votes
23 answers

Detect when browser receives file download

I have a page that allows the user to download a dynamically-generated file. It takes a long time to generate, so I'd like to show a "waiting" indicator. The problem is, I can't figure out how to detect when the browser has received the file so that…
JW.
  • 47,690
  • 30
  • 108
  • 133
402
votes
27 answers

Get MIME type from filename extension

How can I get the MIME type from a file extension?
user34537
381
votes
7 answers

Setting mime type for excel document

MS Excel has the following observed MIME types: application/vnd.ms-excel…
Subramanian
  • 4,892
  • 5
  • 23
  • 23
350
votes
27 answers

How to get a file's Media Type (MIME type)?

How do you get a Media Type (MIME type) from a file using Java? So far I've tried JMimeMagic & Mime-Util. The first gave me memory exceptions, the second doesn't close its streams properly. How would you probe the file to determine its actual type…
Lee Theobald
  • 8,051
  • 12
  • 45
  • 57
256
votes
14 answers

Proper MIME type for OTF fonts

Searching the web, I find heaps of different suggestions for what the proper MIME type for a font is, but I have yet to try any MIME type that rids me of a Chrome warning such as the following: Resource interpreted as font but transferred with MIME…
David Hedlund
  • 121,697
  • 28
  • 196
  • 213
254
votes
4 answers

Which MIME type to use for a binary file that's specific to my program?

My program uses its own binary file type, so I assume I can't use MIME type text/plain, as it is not a 7-bit ASCII file. Should I just call it "application/myappname"?
Powerbook165c
  • 2,541
  • 2
  • 11
  • 3
253
votes
21 answers

Using .NET, how can you find the mime type of a file based on the file signature not the extension

I am looking for a simple way to get a mime type where the file extension is incorrect or not given, something similar to this question only in .Net.
Richard Gourlay
  • 5,198
  • 6
  • 19
  • 17
216
votes
20 answers

How to find the mime type of a file in python?

Let's say you want to save a bunch of files somewhere, for instance in BLOBs. Let's say you want to dish these files out via a web page and have the client automatically open the correct application/viewer. Assumption: The browser figures out which…
Daren Thomas
  • 61,662
  • 38
  • 143
  • 192
161
votes
9 answers

Mail multipart/alternative vs multipart/mixed

When creating email messages you are supposed to set the Content-Type to multipart/alternative when sending HTML and TEXT or multipart/mixed when sending TEXT and attachments. So what do you do if you want to send HTML, Text, and attachments? Use…
Xeoncross
  • 50,836
  • 73
  • 238
  • 351
150
votes
3 answers

Unknown file type MIME?

Do I have to specify a MIME type if the uploaded file has no extension? In other words is there a default general MIME type?
Shimmy Weitzhandler
  • 92,920
  • 119
  • 388
  • 596
130
votes
14 answers

embedding image in html email

I'm trying to send a multipart/related html email with embedded gif images. This email is generated using Oracle PL/SQL. My attempts have failed, with the image showing up as a red X (in Outlook 2007 and yahoo mail) I've been sending html emails…
tbone
  • 13,914
  • 3
  • 31
  • 39
129
votes
6 answers

YAML media type?

What is the most appropriate media type (formally MIME type) to use when sending data structured with YAML over HTTP and why? There is no registered application type or text type that I can see. Example: > GET /example.yaml < Content-Type: ???? < <…
Jon Cram
  • 15,309
  • 21
  • 72
  • 105
127
votes
5 answers

How can I find out a file's MIME type (Content-Type)?

Is there a way to find out the MIME type (or is it called "Content-Type"?) of a file in a Linux bash script? The reason I need it is because ImageShack appears to need it to upload a file, as for some reason it detects the .png file as an…
Mint
  • 12,683
  • 29
  • 67
  • 107
126
votes
4 answers

How to use the CSV MIME-type?

In a web application I am working on, the user can click on a link to a CSV file. There is no header set for the mime-type, so the browser just renders it as text. I would like for this file to be sent as a .csv file, so the user can directly open…
theman_on_vista
1
2 3
99 100