Chunks on server do not sum up

Hi all,

I'm facing an issue with uploading files. I have one that is about 2.3GB that fails.
My platform is a raspberry pi zero with raspbian jessie.
I run owncloud 10.0.3.
Apache is v 2.4.10
Php is PHP 5.6.30-0+deb8u1
Mysql is v 5.5

I have enabled in the .htaccess the following params:
php_value upload_max_filesize 4096M
php_value post_max_size 4096
and in the .user.ini
upload_max_filesize=4096M
post_max_size=4096M
After restarting apache2, from the web client and from the linux client I get the same error: "Chunks on server do not sum up to but to "
This size is the same, and it is about the size of the file.

Do you have suggestions?

Regards

I did the following search https://github.com/owncloud/core/search?utf8=%E2%9C%93&q=%22Chunks+on+server+do+not%22&type=Issues and found https://github.com/owncloud/core/issues/29447

This issue comes with owncloud 10.0.3 and is only seen on 32bit operating systems with uploads > 2GB.
There is possible fix for it:

owncloud/apps/dav/lib/Upload/ChunkingPlugin.php:

--- ChunkingPlugin.php 2017-11-29 12:21:24.908670200 +0100
+++ ChunkingPlugin_fixed.php 2017-11-29 12:12:41.650468900 +0100
@@ -99,7 +99,7 @@
return;
}
$actualSize = $this->sourceNode->getSize();
- if ((int)$expectedSize !== $actualSize) {
+ if ($expectedSize !== (string)$actualSize) {
throw new BadRequest("Chunks on server do not sum up to $expectedSize but to $actualSize");
}
}

1 Like

I can confirm that andre's solution fixes the problem. So to rehearse; in the file
owncloud/apps/dav/lib/Upload/ChunkingPlugin.php

you change the line that says
if ((int)$expectedSize !== $actualSize) {
to
if ($expectedSize !== (string)$actualSize) {

There's an issue ticket here about this https://github.com/owncloud/core/issues/29447