smarter upload of binary data