Monday, September 18, 2006

Day 4 - Base64 File Encoding

Tonight I created a quick app. It takes a file and Base64 encodes it. What good is this? Ask Andrew, he suggested it via an email to ideas at anappaday dot com. Kudos Andrew!

Base64 encoding puts a binary file into a format that is plaintext. This allows you to embed the file in XML or HTML. Specifically this app was design for putting image data in data:uri format for html. See a description of this technique on Wikipedia. This technique has drawbacks, and it's best used only in certain cases. Don't misuse! I'm like the gun manufacturer, don't blame me.

Download the app here
Download the source here

Note that Internet Explorer is not compatible with data:uri information. Does that really suprise you?

10 Comments:

At 10:31 PM, Anonymous Anonymous said...

uuencode
http://www.bastet.com/

 
At 1:14 AM, Anonymous Anonymous said...

I have yet to see a really useful app for the masses

 
At 8:58 AM, Anonymous Anonymous said...

maybe you should read his post "1 Day To Go"... towards the end of it. I think it applies to you, anonymous.

 
At 2:34 PM, Anonymous Anonymous said...

What I would like to see is, an app where you enter a certain date, it saves it, and when you run the app again, it tells you how many days to go until the date.

 
At 3:20 PM, Blogger Unknown said...

Yes, I've been shown UUEncode by some others as well. This is a lightweight executable and hopefully useful to some. I got this request twice.

I'm developing based on the requests YOU ALL make so if you don't like them, request something better.

My apologies for the dead simple app last night. It met the requirements and I was sick...

 
At 3:42 PM, Anonymous Anonymous said...

The entirety of your button2_click's try block in one line:

textBox2.Text = Convert.ToBase64String(File.ReadAllBytes(textBox1.Text));

Not trying to bash your coding, just trying to illustrate that the framework has a lot to offer in the area of rapid development.

 
At 4:42 PM, Anonymous Anonymous said...

I have a idea for a program. A one touch mic/webcam recorder that would sit in the system tray and have a key combonation to start recording. This would be nice for people with laptops that have webcams like me. Or spys.

 
At 2:38 AM, Blogger Unknown said...

Brennan Frydl (Faero) - AWESOME. Thanks. With such a large framwork, who could know it all?

If you're reading this, another great hidden gem is the methods on the Culture class.

Thread.CurrentThread.CurrentCulture.ToProperCase(string)

Is a good example! Apologies for mistypes in that above, not checking syntax.

 
At 5:54 PM, Blogger Jeremy Mikkola said...

how do i get it to run?

 
At 5:46 AM, Blogger Andrew said...

I am extremely excited to see that you coded this! This is very useful for web developers.

 

Post a Comment

<< Home