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:
uuencode
http://www.bastet.com/
I have yet to see a really useful app for the masses
maybe you should read his post "1 Day To Go"... towards the end of it. I think it applies to you, anonymous.
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.
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...
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.
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.
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.
how do i get it to run?
I am extremely excited to see that you coded this! This is very useful for web developers.
Post a Comment
<< Home