Skip to content

Comment on Show HN: ICanHazData – Data URI Swiss Army Knife

Comments

I get why you might want to make this, but isn't it just a one-liner?

echo "data:$(file -b --mime-type somefile);base64,$(base64 somefile)"

Yeah, but its a pain in the butt to iterate when doing that, especially when you just want to dump off clipboard, or drag & drop.

Also wanted an excuse to play with a few browser features :P.

Ahh I see, I can imagine that being a pain (especially with the clipboard). Nice app!

How about this in OSX? echo "data:$(file -b --mime-type filename);base64,$(base64 filename)" | pbcopy

or for linux, your favorite variant of pbcopy using xsel or xcopy?

Not to say this isn't a great tool.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.