add support for uploading buffers