Skip to content

Commit

Permalink
fix: CI fix
Browse files Browse the repository at this point in the history
Signed-off-by: codewithvk <[email protected]>
  • Loading branch information
codewithvk committed Feb 27, 2025
1 parent f4ea829 commit fa8b09f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/Controller/WopiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,7 @@ public function checkFileInfo(string $fileId, string $access_token): JSONRespons

if ($this->capabilitiesService->hasSettingIframeSupport()) {
if (!$isPublic) {
// FIXME: Figure out what is going on here
// have not yet been able to trace the issue
// $response['UserSettings'] = $this->generateSettings($userId, 'userconfig');
$response['UserSettings'] = $this->generateSettings($userId, 'userconfig');
}
$response['SharedSettings'] = $this->generateSettings($userId, 'systemconfig');
}
Expand Down Expand Up @@ -437,8 +435,13 @@ public function uploadSettingsFile(string $fileId, string $access_token): JSONRe
try {
$wopi = $this->wopiMapper->getWopiForToken($access_token);

// may be we are handling both types??
$userId = $wopi->getEditorUid();

if (empty($userId)) {
throw new \Exception('UserID is empty');
}

$content = fopen('php://input', 'rb');
if (!$content) {
throw new \Exception('Failed to read input stream.');
Expand Down
4 changes: 4 additions & 0 deletions lib/Middleware/WOPIMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public function beforeController($controller, $methodName) {
return;
}

if (strpos($this->request->getRequestUri(), 'wopi/settings/upload') !== false) {
return;
}

try {
$fileId = $this->request->getParam('fileId');
$accessToken = $this->request->getParam('access_token');
Expand Down

0 comments on commit fa8b09f

Please sign in to comment.