mime-types

Using an HTTP Handler to process file downloads...all files open in notepad when using firefox

I've written a httphandler to process downloading of files. Regardless of the mime-type, all files try default to notepad when using Firefox. My Code snippet is below. //let's assume that the item object has these values. item.Filename = "testfile.pdf"; item.MimeType = "application/pdf"; context.Response.Buffer = true; context.Respon...

Is there a mapping between mimetypes?

I just finished my first pass of my mimetype -> icon website : http://www.stdicon.com/. If someone gives me the file extension ".doc" then that maps to the mimetype "application/msword" which, if I don't have an icon for, should show an icon for "application/vnd.oasis.opendocument.text" (or visa-versa). Is there any clustering of mimet...

Canonical vs Requested Type in Content Negotation

So I was wondering what should be done with HTTP Content Negotiation regarding requests where the returned data may have multiple valid MIME types. For example if say I have some arbitrary data that has the following possible MIME types: text/data,application/x-data,application/data+xml Given that there are multiple MIME types possib...

what does MIME type for computer system means?

My client gave me the following requirement. I am not able to understand what he means He says: I'm looking for a Java application that sets a mime-type for the user's computer system. The application would be a very simple app (probably a single .class file?), which when run, sets this mime-type for the user's compute...

How can you read a files MIME-type in objective-c

I am interested in detecting the MIME-type for a file in the documents directory of my iPhone application. A search through the docs did not provide any answers. ...

Launching an application with an URL

I want to access a desktop application and launch it on navigating to a 'http' URL. How can i achieve this? Here's what i have found so far - iTunes (i want almost the same functionality with my application) registers a handler for 'itms' and does a javascript call to this 'itms://' URL when the http URL is invoked. I have tried this ou...

How do you configure firefox to open an application without prompting the user?

I've got a serverside app that send down a custom mime-type file "application/x-optibase". Firefox prompt user user to save or open the file and if the user clicks open the correct application launches so I believe I have mimeType.rdf configured correctly I've gone into about:config and set browser.helperApps.neverAsk.openFile to appl...

How to embed audio file in HTML if it's being sent as octet-stream?

I'm trying to write a Greasemonkey script that will convert all "Play" links on a page to embedded audio (using the <embed> tag). When I use a link that I get from a GMail attachment, it works like a charm. When I use a link from another site (Digium Switchvox), the HTTP response header has ContentType set to "application/octet-stream"...

If I serve /favicon.ico as image/vnd.microsoft.icon, instead of image/x-icon, will it break on any browsers?

If I configure Apache to serve /favicon.ico as MIME type image/vnd.microsoft.icon, instead of image/x-icon, will it break on any browsers? Wikipedia's favicon article indicates that image/vnd.microsoft.icon is the "correct" mime type, but that doesn't help if it means some users won't see it. I need to support IE6+, as well as modern b...

Changing the mime type of a non-php file?

I have a file (*.lwxl) that I would like for users to download a file, but the mime-type is text/html, and I would like to change it to application. Is there any way to do this? ...

What MIME type should I use for jQuery Autocomplete queries?

The jQuery Autocomplete plugin relies on an odd response format. Specifically, it's a newline-separated list of pipe-delimited pairs, the first entry of each pair being some formatted text, the latter being a JSON object with some data. An example: Fuzzy Bunnies|{ id: '1234-fuzzy-bunnies', type: 'slippers' } Loud Hawaiian Shirt|{ id: '...

application/force-download

I'm creating a script to only upload zip files and I have the following validation allready: if($itemtype != "application/x-zip-compressed" && $itemtype != "application/zip" && $itemtype != "application/octet-stream") { throw new exception("Your file should be a zip file!"); } but I have a file with file type application/force-do...

Is it ok to return application/octet-stream from a REST interface ?

Am I breaking any laws in the REST bible by returning application/octet-stream for my responses ? The REST endpoint receives 5 image urls. { "image1": "http://ww.o.com/1.gif", "image2": "http://www.foo.be/2.gif" } and it will download these and return them as application/octet-stream. CLARIFICATION: The client that invokes this RES...

request.format returning */*

Good afternoon, I'm currently developing an API for my application on RoR As an example, I created some XML, loaded with all the info I need to create the object, let's say a Person, and using Curl I submitted it to my application I'm able to call exactly the create action I want from the controller and the hash params of the object a...

How to detemine content type of binary data in the image field of SQL Server 2008?

I need to determine file type (i.e., MimeType) of stored data in the SQL Server 2008. Is there anyway, if possible using SQL query, to identify the content type or MimeType of the binary data stored in the image column? ...

How to prevent Internet Explorer from playing wav files?

Hi everyone! Unfortunately I've a problem with IE =( I have a service on IIS that returns me a wav file. So if I go to the URL of the service, IE tries to play returned wav file with Window Media Player. Can I set any setting in the IE (7 or 8) to deny it play wav file with WMP and allow only show Open \ Save \ Cancel dialog? Usually I...

How Can I stop Internet Explorer from automatically displaying XML?

Is there anyway to force Internet Explorer to prompt for download of XML files instead of automatically displaying them? A code solution or just a set of IE configuration steps would be fine. Even if I use the wrong extension, IE uses "content sniffing" to determine that is XML and opens it automatically anyway. I'd rather have the Ope...

Apache Config Mime Types: xlsx files are being interpreted as zip files on download, why?

Background: For some reason, whenever a user tries to open an xslx (excel 2007) file from our intranet using MSIE, the file download dialog interprets it as a "zip" file. Admittedly, xslx files really are zip files, but we don't want that behavior. Just open in Excel, please. Question: Firefox, OTOH, opens the files normally. Is it ...

Declaring mime type for html-email

Hello, I want to create a html email and I've read a lot about how to do it. There is one piece of information I can't find. How should I declare the mime type? I tried with: meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> but it doesn't work. Later edit: I am trying to set the content-type of the mail to text/...

cvs2svn changes binary files

I'm using cvs2svn to migrate from CVS to SVN. I've noticed a problem with my binary file after the conversion was completed. I'm using auto-props file, which is very helpful. After the conversion I took the file from CVS and compared it to the same file from SVN. The file is binary. Using WinMerge, I see that there is a difference bet...