Skip to content

Instantly share code, notes, and snippets.

@zakki
Created December 27, 2016 09:30
Show Gist options
  • Save zakki/b43609a219d9eed5477d87ca99ff3728 to your computer and use it in GitHub Desktop.
Save zakki/b43609a219d9eed5477d87ca99ff3728 to your computer and use it in GitHub Desktop.
emscripten readFile
var buf = FS.readFile('/foo/bar');
var blob = new Blob([buf], {"type" : "application/octet-stream" });
var url = URL.createObjectURL(blob);
$('#result').attr("href", url);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment