It just so happens that there has been an awesome RFC encoding HACK since 1998 that nobody quite knew about. I myself was bewildered to realize that something so obvious can turn into a thing of coded mass. Basically, this hack allows someone to copy/put a string of data, lets say an image file or an mp3 file right into the html/txt document which can then be retrieved to materialize the actual file ! How cool is that? Let me clarify the things a bit:
- You have a jpeg image file which has a special code associated with it
- You can put that whole image file inside a pre-authored document just by copy-pasting that associated code inline with the documents
- With this done, a whole image (or any file) can be embedded in an online document without worrying about where to host it. For example
"foo.jpg"becomes"data:image/jpeg;base64,base_64_encoded_jpeg_goes_here"
This hack can be put to special uses like:
- javascript based image editor
- storage of attachments within a web page or blog entry (simplify file hosting)
- post images or files to forums that allow url posting
- sneak attachments past grumpy email filters
You can see a pre-encoded data-image here (btw, thats Jason Striegel from hackzine) or there (the happy moose :D)
OR
Go encode yourself some data-swag right now, in here (might be down due to digg effect) or there
[Hack VIA: Hackzine]
Tags: 



1 Responses to “Embedding binary data in an inline URL”
-
Proactiv Solution on 1/31/2007
Post a CommentLinks to this post
Create a Link