Skip to content
Snippets Groups Projects
Commit 43f00a2d authored by Björn Schießle's avatar Björn Schießle
Browse files

create uploads directory for ssl certificates if it didn't exists

parent e59a1806
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ OCP\JSON::checkAppEnabled('files_external');
$view = \OCP\Files::getStorage("files_external");
$from = $_FILES['rootcert_import']['tmp_name'];
$path = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/';
if(!file_exists($path)) mkdir($path,0700,true);
$to = $path.$_FILES['rootcert_import']['name'];
move_uploaded_file($from, $to);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment