mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
fixup: sharing gallery for loggedin users fail
This commit is contained in:
parent
cbdcb68c2b
commit
afcf965498
1 changed files with 1 additions and 4 deletions
|
|
@ -93,10 +93,7 @@ function handleGetAlbumThumbnail($token, $albumname)
|
|||
|
||||
function handleGetPhoto($token, $photo) {
|
||||
$owner = OC_Gallery_Sharing::getTokenOwner($token);
|
||||
if (OC_User::isLoggedIn())
|
||||
$file = OC::$CONFIG_DATADIRECTORY.urldecode($photo);
|
||||
else
|
||||
$file = OC::$CONFIG_DATADIRECTORY.'/'.$owner.'/files'.urldecode($photo);
|
||||
$file = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" ).'/'.$owner.'/files'.urldecode($photo);
|
||||
header('Content-Type: '.OC_Image::getMimeTypeForFile($file));
|
||||
OC_Response::sendFile($file);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue