]> source.dussan.org Git - nextcloud-server.git/commitdiff
handle anonymous upload to reshared folder
authorThomas Müller <thomas.mueller@tmit.eu>
Fri, 5 Jul 2013 07:58:41 +0000 (09:58 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Fri, 5 Jul 2013 07:58:41 +0000 (09:58 +0200)
apps/files/ajax/upload.php

index 8433716dec1e545ae228cb827e555da16c3b88ea..fd6aa981542991a388b25ac0fb35432f2a2adaee 100644 (file)
@@ -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();