chf_sufia displayed a "page count" for PDF original downloads.
But our current app is not extracting "page count" from PDFs.
While it's relatively easy to do that with shrine, the way we are defining the shrine uploader in kithe (rather than our local app) makes it tricky to figure out how to define custom app-specific metadata extraction.
We could just have shrine extract PDF page count hard-coded for everyone. Or we could figure out a way to allow local customizations.
One way might be for the local app to define it's own shrine uploader class, as a sub-class of the one in kithe, which it can then add it's own metadata extraction too. The local app could add this attachment to it's local Asset class, and it ought to work to override the uploader set in the Kithe::Asset superclass.
Or there could be other weird ways.
In addition to PDF page count, we might want duration in seconds for time-based media (and maybe other metadata for time based media).
chf_sufia displayed a "page count" for PDF original downloads.
But our current app is not extracting "page count" from PDFs.
While it's relatively easy to do that with shrine, the way we are defining the shrine uploader in kithe (rather than our local app) makes it tricky to figure out how to define custom app-specific metadata extraction.
We could just have shrine extract PDF page count hard-coded for everyone. Or we could figure out a way to allow local customizations.
One way might be for the local app to define it's own shrine uploader class, as a sub-class of the one in kithe, which it can then add it's own metadata extraction too. The local app could add this attachment to it's local
Asset
class, and it ought to work to override the uploader set in the Kithe::Asset superclass.Or there could be other weird ways.
In addition to PDF page count, we might want duration in seconds for time-based media (and maybe other metadata for time based media).
See also #228