server/apps/files_external/ajax/addRootCertificate.php

12 lines
349 B
PHP
Raw Normal View History

<?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;
?>