mime

Setting mime type for excel document

MS Excel has the following acceptable mime types: application/vnd.ms-excel (official) application/msexcel application/x-msexcel application/x-ms-excel application/vnd.ms-excel application/x-excel application/x-dos_ms_excel application/xls application/x-xls Is there any one type that would work for all versions? If not, do we need to ...

Convert MIME tree to MailMessage

I'm writing a a C# program that processes and forwards email messages. I have a POP3 library and a MIME parser, and I need to copy the MIME tree into a System.Net.Mail.MailMessage. What is the best way to map different MIME parts to AlternateViews, LinkedResources, and Attachments? EDIT: That will work with all mail clients (both send...

WPF & Mime types

It is about WPF application which generates reports. Reports have simple structure: byte[] m_Data, string m_Mime. Data array is created, mime type is set, now what I need is to display the dialog with same functionality we find in web browsers' - Open/Save/Cancel dialog that opens file in appropriate application depending on response's...

How do i (url) rewrite without clobbering the mime?

I have a url similar to /abc/1.png i then rewrite it to /full/path/1.png. However it seems like the mime is being clobbered because when hitting view image with firefox i get a download instead of a page with the image. How do i solve this? I am using C# and ASP.NET you can view this post for more details http://stackoverflow.com/questio...

How do i URL rewrite an image properly? C# ASP.NET

I tried several ways to URL rewrite. The first way the image mime was clobbered and was consider an octet stream which didnt allow me to view the image in a browser (unless it was using img src). The 2nd way i wasnt convince it worked. Firefox displayed the img but said the length was 0 (i think it only worked bc it was in my cache). Ho...

Get a MIME from an extention?

How can i get the MIME type from an extension? C# ASP.NET ...

What Encoding Do I Perform On Media Before Sending It In A HTTP Response Body

Hi there, I am currently developing a HTTP server. When a client requests a PNG, my response headers are properly formatted and respond with Content-Type : image/png What steps and encoding processes do I have to perform on my .png file to send it as a byte[] in the http response body? Thanks! ...

Parse MIME messages

Hi, For my new project which has email module.i need to show all the email information on web.when i m making a call to server i m getting the base64 encoded mime data. after applying base64 decoding technique i m getting the mime data as follows: /*****************Mime data start *******************************/ From prashant.n@geode...

getting the mime of text files

I am using a piece of code someone pasted for C# which uses urlmon.dll. It reads in <= 256bytes and returns the mime based on the data. Problem is it cant distinguishes a css file from a text/plain. I can goto /style.css but when including it in my html the CSS does not show up. I am using urlmon + context.Response.TransmitFile to send ...

Getting the mime w/o using urlmon

I was using urlmon to find the MIME of files however it didnt go well when i couldn't get the correct mime of css files and more SWFs. What can i use to get the file mime? ...

How to rewrite a file path or set the virtual path properly?

I want to write /img.png on my site and have it rewrite the path to E:/something/else/root/img.png. I can rewrite the path (and use File.Exist to verify it exist) however the server doesnt find the image. I am using transmit file but that is causing mime problems. How do i set the virtual path? i am using visual studios 9 (2008). ...

Mime-type of downloading file

Hello, i'm trying to create downloadable video-files. In my site there is a list of files. All videos are in .flv-format (flash). There is exact link to the file for the all videos. But in all browsers after clicking content is loading to the browser`s window. I needn't in this. As i understand i should create redirect-page wich contains...

Header parsing + MIME

Hi, While parsing MIME using Erlang, I'm able to extract header, body and attachment. So now I have to parse all these parts separately. Header structure: Header-tag : header-value\n Example: Delivered-To: [email protected]\nReceived: by 1.gnu.geodesic.net (fdm 1.5, account "mail");\n\tFri, 03 Jul 2009 16:56:03 +0530\n so from abo...

Posting Images with a SOAP Web Service (Windows Mobile)

Hey brainiacs, We are developing a Windows Mobile 6 Professional application which captures images and then needs to submit those images to a server (there will be between one and ten images at about 200KB each), along with a bunch of text-based metadata. The organization that runs the environment prefers SOAP to be used for this commun...

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 I can hide the indicator. I'm making the request in a hidden form, which POSTs to the server...

Rails: Best practice creating RSS feeds - MIME detection vs. FeedsController

Hi, I need several RSS feeds in my app. They are in a way similar to existing actions but with less options (no will_paginate, no sorting, only the most recent 20 results). So for example I have one action which shows all items tagged "amazing" and I also need one feed which shows the latest items tagged "amazing". My question: Is it b...

GMail won't open .txt attachment created by iPhone App, Depending on Size - I think There's a Bug in my MIME

I have created aand sent a short email with a .txt attachment in an iPhone app. If the attachment is about 10 lines long, GMail opens it just fine. If it's more than 20 or so lines, GMail chokes - it won't open the attachment, download the attachment, or even forward the email. Also, if I send the same email to my colleague and he ope...

My Bad MIME: The Code is Obj-C, but the Question Isn't Language Specific - Very Tricky

I am using the following dictionary to create a MIME header, to send an email that attaches a text file. It produces the email below the code. Why is everything garbled? Any MIME experts out there? Also, the answer is not as simple as you are Base64 encoding it. If I change it from "inline" to "attachment," the email attachment is corru...

Is it possible to embed an inline image in HTML email using MFMailComposeViewController?

Is it possible to embed a reference to an image in an HTML email sent via MFMailComposeViewController on iPhone OS 3.0? (void)addAttachmentData:(NSData*)attachment mimeType:(NSString*)mimeType fileName:(NSString*)filename doesn't seem to provide any way of either setting or reading the Content-ID header for an attachment, but is there...

multipart PHP mail - accentuations problems![SOLVED]

I'm trying to send a multipart/alternative MIME e-mail via PHP script ... all works fine but I've some problems with the encoding! The accentuated characters, in the e-mail body, are displayed wrongly in the mail client! How can encode the body to solve this problem? ... I've tried to use .. utf8_encode($body) Without good results! I...