Fix multipart inserts via Buffer

by type checking the `data`. If it is a string, use `Buffer.byteLength`, otherwise `data.length`.