updated web.js to convert file buffer to string