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 .

2019 questions
1462
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
  • 65,762
  • 16
  • 114
  • 184
573
votes
24 answers

Detect when a browser receives a 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.
  • 50,691
  • 36
  • 115
  • 143
479
votes
30 answers

Get MIME type from filename extension

How can I get the MIME type from a file extension?
user34537
425
votes
6 answers

Setting mime type for excel document

MS Excel has the following observed MIME types: application/vnd.ms-excel…
Subramanian
  • 5,552
  • 5
  • 25
  • 24
379
votes
28 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,461
  • 12
  • 49
  • 58
299
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,999
  • 2
  • 15
  • 3
268
votes
20 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,518
  • 6
  • 23
  • 17
263
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
  • 128,221
  • 31
  • 203
  • 222
262
votes
19 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
  • 67,947
  • 40
  • 154
  • 200
186
votes
10 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
  • 55,620
  • 80
  • 262
  • 364
174
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
  • 101,809
  • 122
  • 424
  • 632
173
votes
6 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
  • 14,388
  • 30
  • 76
  • 108
169
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
  • 15,107
  • 3
  • 33
  • 40
160
votes
9 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
  • 16,609
  • 24
  • 76
  • 107
149
votes
16 answers

Resource blocked due to MIME type mismatch (X-Content-Type-Options: nosniff)

I am developing a web page using JavaScript and HTML, everything was working good when I have received this list of errors from my HTML page: The resource from “https://raw.githubusercontent.com/dataarts/dat.gui/master/build/dat.gui.min.js” was…
Sim81
  • 1,574
  • 2
  • 9
  • 15
1
2 3
99 100