This release is a pre-release and may not be stable for production use.
Introduction
collective.filepreviewbehavior contains a behavior for using Products.ARFilePreview with dexterity content types. The views and some adapters are overwritten ARFilePreview uses some Archetypes specific stuff.
BE WARNED: If you have a dexterity setup, you may not want to install Archetypes. But Products.ARFilePreview was developed for Archetypes and may still depend on it.
Usage
Add the behavior collective.filepreviewbehavior.interfaces.IPreviewable to the behaviors list of your dexterity conten type, then the uploaded file will be converted to a HTML preview.
Use as name for the file-field “file” and mark it as primary field. The file field should be in your primary schema interfaces, a behavior schema interface may not work.
For more information about marking as primary field check out the dexterity documentation (the chapter on webdav): http://plone.org/products/dexterity/documentation/manual/developer-manual/advanced/webdav-and-other-file-representations
The Views
Products.ARFilePreview provides three views: * file_preview : A view containg the download link and a the preview of the document embedded in the plone theme. * preview_provider : A view only containing the preview of the document. This view can be used as fullscreen / popup preview. * file_asdoc : A view only containing the preview of the document, but embedded in the plone theme.
You may the make some actions for your content, collective.filepreviewbehavior will not create any actions.
Changelog
1.0a1
We should not expect the objects to provide the IBasic behavior, but we know that there is always a Title() and a Description() method (inherited from CMFCore) [26.11.2009, jbaumann]
MissingBinary should not fail, but skip creating the preview and put a error message into the log. [06.11.2009, jbaumann]
It should not fail if there is no primary field value [06.11.2009, jbaumann]
Added some tests, they are not working well because we test with a plain type (without any schemata and without a required file field). [23.10.2009, jbaumann]
Added some documentation [23.10.2009, jbaumann]
Initial implementation [22.10.2009, jbaumann]
Metadata
Release files for collective.filepreviewbehavior 1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| collective.filepreviewbehavior-1.0a1.tar.gz | 6.6 kB | Without provenance | Details for collective.filepreviewbehavior-1.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| collective.filepreviewbehavior-1.0a1-py2.4.egg | Legacy Egg format | - | - | Details for collective.filepreviewbehavior-1.0a1-py2.4.egg |
Total release size: 22.0 kB
Release files / collective.filepreviewbehavior-1.0a1.tar.gz
| Download URL | collective.filepreviewbehavior-1.0a1.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3aba198a5ec27d0283ba6711ce5d3095171031903e4cef5c754055aa495554d
|
|
BLAKE2b-256 checksum How to use checksums |
2ee5f0137d8ecaeb766cdd23d361202a034805b06fb245001493cbe60f04f6c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / collective.filepreviewbehavior-1.0a1-py2.4.egg
| Download URL | collective.filepreviewbehavior-1.0a1-py2.4.egg |
|---|---|
| Size | 15.4 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
22a1a365a3ad4f3ddca08fec85f324d6d2ca07e967cde0317cee9c06d6e876c8
|
|
BLAKE2b-256 checksum How to use checksums |
187e3a332659b784249d98c606236572a4cf734e2c4b58b2a33757a972c29e31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for collective.filepreviewbehavior 1.0a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.