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)"
> echo "data:$(file -b --mime-type somefile);base64,$(base64 somefile)"
Also wanted an excuse to play with a few browser features :P.
or for linux, your favorite variant of pbcopy using xsel or xcopy?
Not to say this isn't a great tool.