mime

WCF client / Axis Server / File transfered by MIME ?

Hi everybody, I have a web service developed with Axis v1.4, the WSDL describe a method with attachement by using MIME. I can't modify the server side. How can I get the attachement file with a WCF client ? Here the WSDL of the service : <operation name="MyMethod"> <soap:operation soapAction="AssTSTService:MyMethod" /> <input> ...

Python: Check if uploaded file is jpg

How can I check if a file uploaded by a user is a real jpg file in Python (Google App Engine)? This is how far I got by now: Script receives image via HTML Form Post and is processed by the following code ... incomming_image = self.request.get("img") image = db.Blob(incomming_image) ... I found mimetypes.guess_type, but it does not ...

how to tell if a string is base64 or not.

Hi guys I have many emails coming in from different sources. they all have attachments, many of them have attachment names in chinese, so these names are converted to base64 by their email clients. When I receive these emails, I wish to decode the name. but there are other names which are not base64. How can I differentiate whether a s...

What is the best way open/edit a data Stream if all I have is a MIME type

I am in a Windows Desktop application and I have a data stream and a mime type in the database. Is there a better way than writing it to a temp folder and launching the default editor for it? If I have to use the temp folder how can I get the file extension from the MIME type in a C# Windows Desktop application? ...

Proper MIME 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 deliver huge amounts of PDFs and I want to do it the correct way, if there is one. ...

YAML mime type?

What is the most appropriate MIME type to use when sending data structured with YAML over HTTP? An explanation of why a given choice is most appropriate would be much appreciated. There is no registered application type or text type that I can see. Example: > GET /example.yaml < Content-Type: ???? < < --- # Favorite movies < - Casab...

IIS6 serving unregistered MIME Types

I have an IIS6 web server (on Win2003) is having a strange behavior which I guess is some undocumented "feature" ... It serves SVG files (extension .svg) without having it registered on the IIS metabase. It does not have the * mime type either. For this request: GET /basic/file1.svg HTTP/1.1 the response contains HTTP/1.1 200 OK Co...

Can I skip MIME-parsing to get an attachment??

Hi - I am new here so first of all my greetings to you I am writing an application to run on my Windows Mobile (Pocket PC). FYI, I am using VB.NET. My idea is to use my e-mail account with my provider, who gives me a lot GB:s to use, as a virtual online storage disk. In a few words, more or less like the GMAIL-drive which you may have ...

Third-party Uniform Type Identifier implementations?

The madness of file extensions and MIME types and creator codes and magic numbers to determine file types is a huge mess. Coming from a background of Cocoa programming, I supposed I'm spoiled: in Tiger, OS X added a system called Uniform Type Identifiers (UTIs) that makes the entire process sane. Given that I'm doing a bunch of web deve...

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 it with calc, excel, gnumeric, etc. header('Content-Type: text/csv'); echo ...

c# - error compiling targeting Compact Net Framework 3.5 - No overload for method 'GetString' takes '1' arguments

Hi again, I actually have two questions regarding the same problem but I think it is better to separate them since I don't think they are related. Background: I am writing a Windows Mobile software in VB.NET which among its tasks needs to connect to a mail-server for sending and retrieving e-mails. As a result, I also need a Mime-pars...

InterPage Linking Problem in MHT

Hello All, I have created a .mht file in following format. The .mht file contains following htmls. a. MHTLinkingProblem.html b. Left.html c. Right.html d. Start.html e. Plus.gif The MHTLinkingProblem.html is the main html which is divided in 2 frames. The Start.html dummy html to display the start of the page The Right.html conta...

Classic ASP/IIS6: How to search the server’s mime map?

This is the same question as this but I'm looking for a classic ASP solution. I have a third party control to provide secure downloads but it expects you to provide the response.contenttype value. I'm trying to have the browser prompt with the following: Response.AddHeader "Content-Disposition", "attachment;filename=""" & strFileName &...

Can I add x-headers to a Lotus Notes email message without COM?

Trying to add a custom header item to a Lotus Notes email item, from the context of a Notes Client Extension before the mail is sent from the Lotus Notes client app. Is this possible? I'm looking along the lines of using something in the NSFItemSetText family of functions if at all possible, as opposed to the lotus script object model ...

Register Silverlight MIME Types in IIS Programmatically

I am creating an installer for a silverlight application and would like to be able to register the .xap extension for IIS automatically. Is there a way to accomplish this without editing the registry? If not, what registry entries to I need to make? Thanks! ...

Weird problem with PHP mail() under Linux.

This is the case when it "works on my machine". Except that my machine is Windows, and the target is some sort of Linux. The idea is that the mail() function puts a newline between the MIME-Version and Content-Type headers, thus breaking the whole thing. Here's the code, simpliefied as much as possible: <?php $HTMLPart = chunk_split(...

Include html part in a mail with python libgmail

I've a question about its usage: i need to send an html formatted mail. I prepare my message with ga = libgmail.GmailAccount(USERNAME,PASSWORD) msg = MIMEMultipart('alternative') msg.attach(part1) msg.attach(part2) ... ga.sendMessage(msg.as_string()) This way doesn't works, it seems can't send msg with sendMessage method. What is th...

What's the best MIME type for video on the web?

I'm the admin for a large media intensive site. We've done some experimentation with our video MIME types. We've alternated between forcing the download using Content-Disposition: attachment + Content-type: application/octet-stream and actually returning the proper MIME type. We've had complaints either way we set it up. With the prope...

JavaMail Question or Bug?

I have a question about Java Mail and how it works with streams. In Java Mail 1.4.1 there is a MimeMessage constructor that accepts a stream. My understanding is that I could pass a stream to this constructor and it would parse it for me into a MimeMessage. I wrote 2 tests to prove this. The first test sends in a stream that contains...

How to initialize a IMimeMessage object from IStream

Given an empty MimeMessage created with e.g. MimeOleCreateMessage function, how can I initialize it from an IStream / data buffer, which contains the complete message text? ...