Permalink
Browse files

Fix to WOPI upload content length size

  • Loading branch information...
1 parent e272eb5 commit 2c9e3a4a1cf32c5a5074496e56c58c1ea4c16bba @ghecquet ghecquet committed Sep 23, 2016
Showing with 4 additions and 1 deletion.
  1. +4 −1 core/src/core/src/pydio/Core/Http/Wopi/AuthFrontend.php
@@ -27,6 +27,7 @@
use Pydio\Core\Services\ApiKeysService;
use Pydio\Auth\Frontend\Core\AbstractAuthFrontend;
use Pydio\Conf\Sql\SqlConfDriver;
+use Pydio\Log\Core\Logger;
use Zend\Diactoros\UploadedFile;
defined('AJXP_EXEC') or die('Access not allowed');
@@ -85,9 +86,11 @@ function retrieveParams(ServerRequestInterface &$request, ResponseInterface &$re
if ($action == "upload") {
$stream = $request->getBody();
+ $size = (int)$request->getHeader("Content-Length")[0];
+
$uploadedFile = new UploadedFile(
$stream,
- (int)$request->getHeader("content-length"),
+ $size,
0,
basename($path)
);

0 comments on commit 2c9e3a4

Please sign in to comment.