get content-length from buffer instead of string (see http://stackoverflow.com/questions/17284408/knox-s3-upload-corrupted-or-truncated-file)