mime-types

uploading a zip file causes some problem for some users - weird mime type

I have a form where the user can upload a zip file, it works perfectly on my side but the client I'm making the website for is not able to upload the zip. I check for the mime type and normally it should work for her to but the problem is that her mime type looks like this: application/octet-stream/" why is there a /" ? anyone experie...

In Mono/Gnome, how can I look up the icon for a mime type?

Gnome.Icon and Gnome.ThumbnailFactory both want me to pass in a URI of a file whose icon I want -- I only have a MIME type, which I want to look up an icon for. Is there a GNOME C# API function which will give me what I want? Ideally the prototype would just be: Gdk.Pixbuf LookupIcon (string mime_type); ...

Multiple MIME types in Android

Is there a way to use setType() and supply multiple broad types (like images and video)? I'm using an ACTION_GET_CONTENT. It seems to be working with just comma-separated types. ...

Java Servlet Mimetype and Internet Explorer mimetype handling bug

I have a servlet that may return text/html or application/pdf content. Apparently, it looks like Internet Explorer (IE7) does not handle the application/pdf correctly. For example. Servlet Output A may return html content: [html content here] And then Servlet Output B may return PDF content: [pdf content here] The URL associated w...

How to get the corresponding file extension if the mimeType of the file is known

When coding in java, How to get the corresponding file extension if the mimeType of the file is known? ...

After defining a MIME extension it will be difficult to register it on the hostin server

Hi, after I define a kind of file format, it is dificult for hosting providers to register it for my site? i can ask that after i paid the service? it must be a mime type properly register at ietf. thanks in advance ...

List of ALL MimeTypes on the Planet, mapped to File Extensions?

Is there a resource that lists ALL the mimeTypes in existence? I have found a few places with under 1000 mimeTypes, but then they still don't include common ones like .rar, .fla, .rb, .docx! Does anyone have a COMPLETE list of mimetypes? Not down to the most obsure "company-only" ones, but at least all of the ones we might use. Also,...

Why is IE 7 renaming downloaded XLA files as XLS when saving?

I have an Excel Add-In file I'm publishing on an intranet (plain ol' HTTP download, not an attachment in Sharepoint, etc.). With IE 7, the user click the link and selects "Save", only to have the file renamed from "myaddin.xla" to "myaddin.xls". Firefox and Chrome work fine. Since they are trying to overwrite an existing file in the Li...

Verifying Uploaded File

I am working on a document that requires a user to upload a Microsoft Word Documents. Apart from checking the file extension to be .doc or .docx, is there any other way i can verify that the uploaded file is actually a Microsoft Word Document and not any other file renamed to a .doc or .docx extension. Thanks in advance. ...

Mimetypes for a RESTful API

The Sun Cloud API at http://kenai.com/projects/suncloudapis/pages/Home is a good example to follow for a RESTful API. True to RESTful principles, when you GET a resource you get no more nor less than a representation of that resource. The Content-Type header in the response tells you exactly what the type of that resource is, for examp...

How to receive drag and drop from Apple Address book in Qt 4.4 on Mac OS X 10.5/10.6

I am trying to trap drag and drop events from the standard Apple address book app to my Qt app. This code works fine with Qt 4.4. on Mac OS X 10.4: void MyView::contentsDropEvent( QDropEvent* e ) { QList<QUrl> urls = e->mimeData()->urls(); ... I can then use the URL to get the vCard. Marvellous. But from Mac OS X 10.5 the ap...

Adding Silverlight MimeType using adsutil

I have a script that creates an app pool, web site - and then I want to use adsutil to add the .xap MimeType. I see this: cscript adsutil.vbs set W3SVC//Root/MimeMap “.extension,mimetype” However, since I am creating the web site in the same script I will not know the ID. Would anyone know how to do this with adsutil? Thanks, Rich...

How to add mime-type for <video> element on Firefox ?

Hi everybody, Into this dir there are : OGV video (Theora/Vorbis) for Firefox MP4 video (H264/AAC) for Safari FLV video with a flash player (player.swf) for others browsers a template.html which contains a snippet coming from Video for everybody a .htaccess to add the new types of video Locally the video is correctly displayed on al...

Upload vCard (.vcf) file to IIS7 Site

I'm trying to upload a vcard file to a site i've built with ASP.NET. It's hosted on an IIS7 server. I keep running into the "content type not allowed" error when i try to upload the file. I have write permission to the directory, I've already added the MIME type for vcards and restarted the IIS server, however it still refuses to take i...

How do I generate a content type string with codecs for a media file?

Is there a command-line tool that sniffs video/audio files and generates detailed content-type strings for them, in the format specified in the HTML5 spec and in RFC4281? I want to use this serverside to avoid recoding of uploaded MP4 and OGG files whenever the encoding is supported by HTML5 browsers. Video hosting sites have opted to r...

How can I set global mime-types for IIS6 programmatically?

Currently I am able to to set a mime type with adsutil.vbs for the primary web site on IIS6 with the following syntax: cscript adsutil.vbs set W3SVC/1/Root/MimeMap ".manifest, text/cache-manifest" This seems to work fine when I only need to target W3SVC/1. I need to write an update script that will make sure that any sites on a given...

Java - HowTo extract MimeType from a byte[]

Hi all, I've a web page that that can be used to upload files. Now I need to check if the file type is correct (zip, jpg, pdf,...). I can use the mimeType that comes with the request but I don't trust the user and let's say I want to be sure that nobody is able to upload a .gif file that was renamed in .jpg I think that in this case I s...

Content Dispostion header set in PHP not working with Firefox

I have a form button that submits the data to generic script (the same page that the form is loaded from, index.php) and if the right POST variables are submitted to that script, it returns a PDF for the user to print (with the relevant form info loaded, and other DB info, etc). The problem is that no matter what I set the content-type ...

Download PHP script instead of executing it

I have a downloads directory on a website where I store a bunch of different files for people to download (zip, exe, java, php, etc). The problem is that my website is written in PHP, so the web server, Apache, tries to execute the scripts instead of letting people download them. Without having access to Apache config (I'm on shared host...

Illustrator opening as PDF

I am coding a file sharing application for my office. One strange problem I am going through is the Illustrator files being opened in PDF when you hit the download button. This problem is triggered because the mime type of illustrator files is application/pdf. So the browser when it reads the file, triggers Acrobat to open the file. Is ...