nextcloud/apps/files_external/ajax/removeRootCertificate.php

12 lines
334 B
PHP
Raw Normal View History

<?php
OCP\JSON::checkAppEnabled('files_external');
2012-08-10 02:44:35 +04:00
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
$view = \OCP\Files::getStorage("files_external");
$cert = $_POST['cert'];
$file = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'.$cert;
unlink($file);
OC_Mount_Config::createCertificateBundle();