Re: [whatwg/fetch] data: URL generator (#665)

If we have a reference to a file in memory, and not attempting to read the file from `stdin` we can use 'mimetype' from package 'libfile-mimeinfo-perl' 

`echo "data:"`mimetype -Mb <file>`";base64,"`base64 -w 0 <file> | sed 's/ //g'``

See also https://github.com/aws/aws-cli/issues/1204


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/665#issuecomment-363160252

Received on Monday, 5 February 2018 17:38:18 UTC