You can transport binary data inside HTML for images and audio files, too:
img src="data:image/png;base64,(+base64 encoded image data)"
audio controls="controls" preload="auto"
source type="audio/mpeg" src="data:audio/mpeg;base64,(+base64 encoded audio data iso-8859-1)"
The "data" URL scheme
By the way, you can base64 encode files via Mac Terminal:
> openssl base64 -in infile .out outfile
img src="data:image/png;base64,(+base64 encoded image data)"
audio controls="controls" preload="auto"
source type="audio/mpeg" src="data:audio/mpeg;base64,(+base64 encoded audio data iso-8859-1)"
The "data" URL scheme
By the way, you can base64 encode files via Mac Terminal:
> openssl base64 -in infile .out outfile
Comments
Post a Comment