\OC\Files\Filesystem::getPath($fileId);

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

\OC\Files\Filesystem::getPath($fileId);

tharinduDG
I'm trying to call "\OC\Files\Filesystem::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 doesn't happen. 

Please help.
Thank You

_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud
Reply | Threaded
Open this post in threaded view
|

Re: \OC\Files\Filesystem::getPath($fileId);

Jakob Sack-2
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

_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud
Reply | Threaded
Open this post in threaded view
|

Re: \OC\Files\Filesystem::getPath($fileId);

tharinduDG
could you please tell me how to initialize it by hand? I tried, but failed. I have been asking this question several times but no help. If you can please help me.
Thank You


On Thu, Jul 4, 2013 at 12:26 PM, Jakob Sack <[hidden email]> wrote:
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

_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud


_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud
Reply | Threaded
Open this post in threaded view
|

Re: \OC\Files\Filesystem::getPath($fileId);

tharinduDG
Your information was useful. I found it. 

Call ::  OC_Util::setupFS($userid);

thank you


On Thu, Jul 4, 2013 at 12:31 PM, Tharindu Dhananjaya Galappaththi <[hidden email]> wrote:
could you please tell me how to initialize it by hand? I tried, but failed. I have been asking this question several times but no help. If you can please help me.
Thank You


On Thu, Jul 4, 2013 at 12:26 PM, Jakob Sack <[hidden email]> wrote:
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

_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud



_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud