Gallery of Document Files

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
dan.rossiter's picture

I'm the developer of a relatively popular WordPress plugin (wordpress.org/plugins/document-gallery), and with the release of D8 I feel that the platform may now have the media functionality I would need in order to bring over the same plugin to Drupal. Before I start this endeavor, I wanted to get some feedback on the "right" way to implement what I want to do in the Drupal way. If I'm going to bring it over, I want to do it right.

The concept of the module will be displaying a gallery of many files, primarily non-image files, each of which will have an image automagically generated via various tools. Within WordPress, we support about 100 filetypes from PDFs and Word docs to the more obscure Graphviz and Visio filetypes. Each entry in the gallery will have a title and optionally a description associated with it which would be rendered upon output.

The way I was planning to approach this was in two stages:
1. Using entity_embed functionality, develop field formatters for each of the file conversion tools I plan to use, each of which would accept certain file types and be able to output the file thumbnail, title, and description.
2. Once #1 is solid, I believe I would need to develop a custom entity to house 1 to many files, at which point rendering this parent entity should give me a "gallery".

First question: Does the approach seem reasonable? If not, what should I rethink?

Second question: Is what is the "right" way to store these automagically generated thumbnails that "belong" to a certain file? Is something like arbitrary metadata an option -- maybe I can store a thumbnail file path in there pointing at the thumbnail.

Third question: Would there be any interest in some of this functionality being under the official media umbrella? Something like a "thumbnail_embed" module that encompasses part #1. (Part #2 is probably not nearly as good of a fit for being under the official media umbrella, I presume.)

And finally, I apologize for any botched terminology or stupid questions. I've been studying Drupal 8 pretty heavily for the past few days, but as I'm sure y'all are aware, it's a pretty steep learning curve, especially since D8 is very lacking in any StackOverflow coverage this close following the release.

Thanks!

Media

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: