diff options
-rw-r--r-- | lib/AppInfo/Application.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 07485aa7..6883a3c7 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -156,11 +156,14 @@ class Application extends App { } public function checkAndEnableCODEServer() { - // Supported only on Linux OS, and x86_64 platform - if (PHP_OS_FAMILY !== 'Linux' || php_uname('m') !== 'x86_64') + // Supported only on Linux OS, and x86_64 & ARM64 platforms + $supportedArchs = array('x86_64', 'aarch64'); + if (PHP_OS_FAMILY !== 'Linux' || !in_array(php_uname('m'), $supportedArchs)) return; - if ($this->getContainer()->getServer()->getAppManager()->isEnabledForUser('richdocumentscode')) { + $CODEAppID = (php_uname('m') === 'x86_64') ? 'richdocumentscode' : 'richdocumentscode_arm64'; + + if ($this->getContainer()->getServer()->getAppManager()->isEnabledForUser($CODEAppID)) { $appConfig = $this->getContainer()->query(AppConfig::class); $wopi_url = $appConfig->getAppValue('wopi_url'); @@ -170,7 +173,7 @@ class Application extends App { } $urlGenerator = \OC::$server->getURLGenerator(); - $relativeUrl = $urlGenerator->linkTo('richdocumentscode', '') . 'proxy.php'; + $relativeUrl = $urlGenerator->linkTo($CODEAppID, '') . 'proxy.php'; $absoluteUrl = $urlGenerator->getAbsoluteURL($relativeUrl); $wopi_url = $absoluteUrl . '?req='; |