(#2577) - fix binary/blob attachments over http

LevelDB is broken and I don't have the patience right now to figure out why.
This particular function was only called from a then, it fails because callback is called from outside the then function but defined inside, fixed over in the agragated branch