diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2012-07-04 17:16:02 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2012-07-04 17:18:36 +0200 |
commit | 5d61b85a1dace6ebb41025deaad019af8b3e5145 (patch) | |
tree | 1302e8d80c5942bf4bb741d8b8257b9ce26471da /apps/files_external/ajax | |
parent | b2eac08ad3a279ab81c508929c68d947bedbc9da (diff) | |
download | nextcloud-server-5d61b85a1dace6ebb41025deaad019af8b3e5145.tar.gz nextcloud-server-5d61b85a1dace6ebb41025deaad019af8b3e5145.zip |
allow users to upload ssl root certificates for the webdav client
Diffstat (limited to 'apps/files_external/ajax')
-rw-r--r-- | apps/files_external/ajax/addRootCertificate.php | 12 | ||||
-rw-r--r-- | apps/files_external/ajax/removeRootCertificate.php | 9 |
2 files changed, 21 insertions, 0 deletions
diff --git a/apps/files_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php new file mode 100644 index 00000000000..33cd64d2c7a --- /dev/null +++ b/apps/files_external/ajax/addRootCertificate.php @@ -0,0 +1,12 @@ +<?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; +?>
\ No newline at end of file diff --git a/apps/files_external/ajax/removeRootCertificate.php b/apps/files_external/ajax/removeRootCertificate.php new file mode 100644 index 00000000000..05f2fdef2d1 --- /dev/null +++ b/apps/files_external/ajax/removeRootCertificate.php @@ -0,0 +1,9 @@ +<?php + +OCP\JSON::checkAppEnabled('files_external'); + +$view = \OCP\Files::getStorage("files_external"); +$cert = $_POST['cert']; +$file = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").$cert; +unlink($file); +?>
\ No newline at end of file |