From 05f0d352cf228518d6333a375e89ca30d645ebfb Mon Sep 17 00:00:00 2001 From: nachoparker Date: Thu, 30 Sep 2021 22:48:27 -0600 Subject: [PATCH] ncp-web: fix upload from local file path Signed-off-by: nachoparker --- changelog.md | 2 +- ncp-web/upload.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index abc29447..8b1475fa 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,5 @@ -[v1.39.19](https://github.com/nextcloud/nextcloudpi/commit/b177bd1) (2021-09-30) ncp-web: fix upload from local file path +[v1.39.19](https://github.com/nextcloud/nextcloudpi/commit/92bec43) (2021-09-30) ncp-web: fix upload from local file path [v1.39.18](https://github.com/nextcloud/nextcloudpi/commit/f1c90f5) (2021-09-30) nc-httpsonly: always use overwriteprotocol https in all cases diff --git a/ncp-web/upload.php b/ncp-web/upload.php index 38b47cb7..1dc6a788 100644 --- a/ncp-web/upload.php +++ b/ncp-web/upload.php @@ -38,7 +38,7 @@ $extension = pathinfo($file_name, PATHINFO_EXTENSION); if ($extension !== "tar" and $extension !== "gz") exit( '{ "output": "invalid file" }' ); -if (!move_uploaded_file($file_tmp, sys_get_temp_dir() . '/' . $file_name)) +if (!move_uploaded_file($file_tmp, '/tmp/' . $file_name)) exit('{ "output": "upload denied" }'); // return JSON