Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix to WOPI upload content length size
Browse files Browse the repository at this point in the history
  • Loading branch information
ghecquet committed Sep 23, 2016
1 parent e272eb5 commit 2c9e3a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/src/core/src/pydio/Core/Http/Wopi/AuthFrontend.php
Expand Up @@ -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');
Expand Down Expand Up @@ -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)
);
Expand Down

0 comments on commit 2c9e3a4

Please sign in to comment.