nextcloud/apps/files_external/ajax/addRootCertificate.php

12 lines
349 B
PHP

<?php
OCP\JSON::checkAppEnabled('files_external');
$view = \OCP\Files::getStorage("files_external");
$from = $_FILES['rootcert_import']['tmp_name'];
$to = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").$_FILES['rootcert_import']['name'];
move_uploaded_file($from, $to);
header("Location: settings/personal.php");
exit;
?>