From fe14a6cdc30082d8a01d015821181aaecde78b72 Mon Sep 17 00:00:00 2001 From: itay9001 Date: Thu, 1 Feb 2018 13:33:36 +0200 Subject: [PATCH] Update Client.php mb_strlen is not right here as files need to be considered in their "raw" format and not the ASCII parsed one, This was causing the "Received error from B2: Sha1 did not match data received" Error. --- src/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.php b/src/Client.php index 55bbfd6..6fb7ecc 100644 --- a/src/Client.php +++ b/src/Client.php @@ -194,7 +194,7 @@ public function upload(array $options) } else { // We've been given a simple string body, it's super simple to calculate the hash and size. $hash = sha1($options['Body']); - $size = mb_strlen($options['Body']); + $size = strlen($options['Body']); } if (!isset($options['FileLastModified'])) {