In a previous discussion... > File Preview for New File Type > > You need to write a class that implements certain methods: > - getMimeType() - this function should return 'application/dicom’ in > your case. > - getThumbnail() - this function would return the actual preview.
...and... > Finally you need to register your preview providers. > You would put this line of code into your appinfo/app.php > ``` > \OC\Preview::registerProvider('OC\Preview\PDF’); > ``` > > You shouldn’t use \OC\Preview directly, but sadly there is no public > api function for this yet. ...I overheard Georg Ehrke state that he'd... > I’ll add one and I’ll also write a proper interface for preview > providers. I made a preview provider for ePub documents, to be used with the OPDS catalog (files_opds) app. Splicing this provider in to Owncloud from within an app directory feels rather unclean as it involves using an alien namespace (preview providers seem to want to live in \OC\Preview) in an app directory, necessitating the use of 'require' to get the classes loaded. A 'proper interface for preview providers' sounds like a good thing to have - has one been created? Gr//Fr -- WWWWW ________________________ ## o o\ / Frank de Lange \ }# \| / \ \ `--| _/ <Hacker for Hire> \ `---' \ +46-734352015 / \ ownclou...@unternet.org / `------------------------' [ "Omnis enim res, quae dando non deficit, dum habetur et non datur, nondum habetur, quomodo habenda est." ]
signature.asc
Description: PGP signature
_______________________________________________ Devel mailing list Devel@owncloud.org http://mailman.owncloud.org/mailman/listinfo/devel