setBaseUri($base); } // Support for LOCK and UNLOCK $lockBackend = new File($tmpDir . '/locksdb'); $lockPlugin = new Plugin($lockBackend); $server->addPlugin($lockPlugin); // Support for html frontend // may be used for debugging purposes //$browser = new \Sabre\DAV\Browser\Plugin(); //$server->addPlugin($browser); // Automatically guess (some) contenttypes, based on extesion $server->addPlugin(new GuessContentType()); // Authentication backend //$authBackend = new \Sabre\DAV\Auth\Backend\File('.htdigest'); $authBackend = new DocscanAuth($app->DB); $auth = new AuthPlugin($authBackend); $server->addPlugin($auth); // Temporary file filter //$tempFF = new \Sabre\DAV\TemporaryFileFilterPlugin($tmpDir); //$server->addPlugin($tempFF); // And off we go! $server->exec();