factored out loadFileAsDataURI.js