             headerData = header.data(using: .utf8)!
             footerData = "\r\n".data(using: .utf8)!
             bodyPart = part
-            totalLength = headerData.count + bodyPart.length + footerData.count
+            totalLength = headerData.count + bodyPart.count + footerData.count
             totalSentLength = 0
 
             super.init()

            self.name = name
            self.mimeType = mimeType
            self.fileName = fileName
            self.length = data.count
        }

        /// Returns Part instance that has input stream of specifed file URL.

            self.name = name
            self.mimeType = mimeType
            self.fileName = fileName
            self.count = data.count
        }

        /// Returns Part instance that has input stream of specifed data.
