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

Merge pull request #10494 from owncloud/fix_upload_to_public_folder

set incognitoMode to true during upload to a public folder
parents 1c23f54d 043cd1d0
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,8 @@ if (empty($_POST['dirToken'])) {
// and the upload/file transfer code needs to be refactored into a utility method
// that could be used there
\OC_User::setIncognitoMode(true);
// return only read permissions for public upload
$allowedPermissions = OCP\PERMISSION_READ;
$publicDirectory = !empty($_POST['subdir']) ? $_POST['subdir'] : '/';
......@@ -175,7 +177,7 @@ if (strpos($dir, '..') === false) {
} catch(Exception $ex) {
$error = $ex->getMessage();
}
} else {
// file already exists
$meta = \OC\Files\Filesystem::getFileInfo($target);
......
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