[Owncloud] \OC\Files\Filesystem::getPath($fileId);

Jakob Sack mail at jakobsack.de
Thu Jul 4 06:56:28 UTC 2013


Hello,

the Filesystem gets set up once the user logs in.
On a guest page there is no known user, you have to initialize the 
filesystem by hand:

OC\Files\Filesystem::init($user, $root)

Hope that helps,

Jakob

Am 04.07.2013 07:37, schrieb Tharindu Dhananjaya Galappaththi:
> Im trying to call "OCFilesFilesystem::getPath($fileId);" method from 
> a
> guest page. But it gives me this error.
>
> PHP Fatal error:  Call to a member function getPath() on a non-object
> in /var/www/owncloud5/lib/files/filesystem.php on line 638, 
>
> Since the guest page is loaded with out a user being logged in, this
> error occurs. 
> when a user is logged in to the ownCloud, this error doesnt happen. 
>
> Please help.
>  Thank You




More information about the Owncloud mailing list