mghicks

Thursday, 3/22/07

Data: URI Scheme

Filed under: perl, web — mghicks @ 4:30 pm

The data: URI scheme is a nifty way to include files for download as I did here without having to mess with attachments or file hosting. Encoding the payload is just a one-liner.

cat file.txt | perl -MURI::Encode -e "print URI::Encode::uri_encode(join('',<STDIN>))" > link.txt

There are also websites like this one that will do the encoding, for the command-line shy.

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.