Thanks a lot for the tip!
In the meanwhile, I found out a simpler way of getting the preview, using
$preview_path = $rootURL . "index.php/core/preview.png?file=%2F" . $file_path . "&x=64&y=64";
The drawback of this method is that it looks like the preview is generated on the fly, so it takes a while for loading.
Regarding your suggestion,
\OC::$server->getRootFolder()->getById( $fileId )
returns me an array of
OC\\Files\\Node\\File $file .
If I make
I get back an
OC\\Files\\SimpleFS\\SimpleFile object. With this object, I would have to create a preview file, which turns out beeing the same as I described above. Is this right?
Is this the right way of getting an image file preview?