Fix line-end detection for binary streams upload.