diff --git a/lib/WOPI/Parser.php b/lib/WOPI/Parser.php index cf581477..53dfd05e 100755 --- a/lib/WOPI/Parser.php +++ b/lib/WOPI/Parser.php @@ -182,6 +182,11 @@ public function getUrlSrcForFile(File $file, bool $edit): string { 'internal-' . $fallbackProtocol, ]; + $userAgent = $_SERVER["HTTP_USER_AGENT"]; + if (preg_match("/(android|mobile)/i", $userAgent)) { + $edit = false; + } + $actions = [ $edit && $file->getSize() === 0 ? self::ACTION_EDITNEW : null, $edit ? self::ACTION_EDIT : null,