(#3008) - fix base64 putAttachment in http.js

`putAttachment` wasn't working correctly in `http.js` with base64-encoded strings, now it is.