CFDirectoryLister directory browser and data image URLs

Filed under: ColdFusion

comments (5) Views: 4,157

While looking through a folder of images on my website I realized that there was no easy to way see all of the contents without knowing the actual file name. That would require FTPing to my server and sifting through everything in there until I found what I wanted. So I decided to fix that and write a quick directory listing app. Of course it's ColdFusion but it has more going for it as well.

cfdirectorylister screenshot I wanted this app to be completely self-contained, but I also wanted it to be well designed, with attractive icons. Then I realized that I could embed all of the images uising a technique called data image URLs. It's a way of embedding data into a page by encoding the file as base64. It converts the image into a long string of text which can then be used anywhere a URL to an image file would be used. If you're on a Mac encoding an image is a cinch. Run the following command, making sure to add in the path to your image file.


openssl enc -base64 -in <file name> | tr -d '
' | pbcopy

If you'd like to try out the CFDirectoryLister then head over to my Uploads folder. You can also download the source at Github

Amazon logo

If this article was interesting, or helpful, or even wrong, please consider leaving a comment, or buying something from my wishlist. It's appreciated!

comments powered by Disqus
coach outlet online jordan 13 grey toe beats by dre cyber monday michael kors black friday beats by dre cyber monday jordan 6 black infrared north face cyber monday michael kors cyber monday north face black friday coach outlet black infrared 23 13s north face cyber monday jordan 6 black infrared north face black friday coach cyber monday jordan 11 legend blue north face cyber monday black infrared 6s lebron 12 north face black friday jordan 11 legend blue louis vuitton outlet jordan 13 grey toe grey toe 13s beats by dre black friday coach black friday jordan 13 grey toe coach cyber monday uggs black friday jordan 13 black infrared 23 uggs cyber monday barons 13s uggs black friday beats by dre cyber monday black infrared 6s jordan 13 bred jordan 13 black infrared 23 north face black friday black infrared 6s jordan 11 legend blue michael kors black friday jordan 13 grey toe coach black friday michael kors black friday michael kors cyber monday beats by dre cyber Monday north face cyber monday coach black friday michael kors cyber monday beats by dre cyber Monday north face black friday beats by dre black friday lululemon black friday uggs black friday jordan 13 bred coach cyber monday beats by dre black friday uggs black friday coach black friday black infrared 6s