From 11172db55b5d180a9c16adb75360050985b9fe60 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20M=C3=BCller?= Date: Fri, 5 Jul 2013 09:58:41 +0200 Subject: [PATCH] handle anonymous upload to reshared folder --- apps/files/ajax/upload.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 8433716dec1..fd6aa981542 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -35,6 +35,11 @@ if (empty($_POST['dirToken'])) { isset($_POST['subdir']) ? $_POST['subdir'] : '' ); + // handle reshare + if (!empty($linkItem['parent'])) { + $dir = '/Shared'.$dir; + } + if (!$dir || empty($dir) || $dir === false) { OCP\JSON::error(array('data' => array_merge(array('message' => $l->t('Unable to set upload directory.'))))); die(); -- 2.39.5