nextcloud/apps/files_external/ajax/removeRootCertificate.php

10 lines
286 B
PHP
Raw Normal View History

<?php
OCP\JSON::checkAppEnabled('files_external');
$view = \OCP\Files::getStorage("files_external");
$cert = $_POST['cert'];
$file = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'.$cert;
unlink($file);
OC_Mount_Config::createCertificateBundle();
?>