« Multi-monitor Support in AIR | Main | Encrypting Data in AIR »

December 4, 2007

Mapping File Extensions to MIME Types

When writing Salsa (an Amazon S3 client), I ran into a situation where I needed to map MIME types to file extensions and vice versa. So I wrote a simple but very handy utility to do it for me. The ActionScript code is here if you just want to copy it, or it's available in as3corelib if you want grab the entire library (with tons of other useful APIs).

Posted by cantrell at December 4, 2007 8:57 AM

Comments

Thanks, Christian! I do remember needing something like this, on more than one occasion. I never found such a conveniently packaged lookup mechanism, though.

I think last time I thought I needed this functionality, I ended up rethinking my application/module's design, and was able to eliminate the need for MIMEextension mapping.

But, I know that's not always possible. So, I am saving this code, because it will probably come in handy someday!

Posted by: spugbrap at December 4, 2007 10:58 AM




Remember Me?

(you may use HTML tags for style)

Copyright © 2009 Adobe Systems Incorporated. All rights reserved.
Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy (updated 07-14-2009).