ltrim $display_path in attach_store() to be consistent with attach_mkdir() and go to created folder after successfully creating one

This commit is contained in:
git-marijus
2017-07-30 19:21:02 +02:00
parent ead80481b9
commit 4a071b9a1c
2 changed files with 4 additions and 2 deletions

View File

@@ -35,6 +35,8 @@ class File_upload extends \Zotlabs\Web\Controller {
if($_REQUEST['filename']) {
$r = attach_mkdir($channel, get_observer_hash(), $_REQUEST);
if($r['success'])
goaway(z_root() . '/cloud/' . $channel['channel_address'] . '/' . $r['data']['display_path']);
}
else {
$r = attach_store($channel, get_observer_hash(), '', $_REQUEST);