#199: Integration of ARFilePreview in Plone core (preview of office and other binary files)
- Contents
- Proposed by
- Thierry Benita
- Seconded by
- Jean-Nicolas Bès
- Proposal type
- User interface
- Repository branch
- ARFilePreview-2.3-plone.transforms
- State
- being-discussed
Definitions
Motivation
Plone doesn't show a preview of binary (office?) files. This proposal is about adding an automatic/configurable preview on ATFile content type and subclasses.
Assumptions
We assume that a content transformation engine is available (PortalTransforms or plone.transforms).
Proposal
- make it a zope3 style product (ie: an egg)
- define a new viewlet
- make it use plone.transforms by default and PloneTransforms as a fallback
- make it store the html preview and subobjects as blob or file objects instead of strings
- remove the AR (atReal) prefixes
- add some translations
- make it uninstalled by default (just like Marshall or Iterate)
Implementation
The preview and subobjects are currently stored as objects annotations.
The html transform is triggered by an IObjectEdited event.
Deliverables
- plone.preview
- documentation
- localization
- unit tests
Risks
The main risk is that uploading files could take a little more time because the transformation is triggered by a synchronous event.
We could work around this issue by :
- limiting the maximum size of previewable files
- triggering the preview manually (content action)
- (HARD) implement an asynchronous preview engine that queues previewing jobs and process them later (later => in another thread/request)
The overhead of registering the configure.zcml but disabling the feature will be an event subscriber triggered to do nothing but checking the activation setting on each modifications of an object.
Progress log
The product is working but needs to be polished/reworked to be as pretty as the other Plone products.
Participants
Jean-Nicolas Bès (drjnut) atReal
Thierry Benita (tbenita) atReal
Lot of code?
Why do I think that we need this in the future releases (3.5 or more)?
We agree that this is a great feature that people will be pleased to work with.
Think about using ExternalEditor along with the preview on an odt/doc file... It could make Plone as the standard "intranet desktop".
We are already using ARFilePreview/ExternalEditor like this on our own intranet and it's saving us a lot of time.
Framework team vote