Hacker News new | ask | show | jobs
by orf 3490 days ago
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)"

1 comments

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.