Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython

collective.filepreviewbehavior is unavailable in PyPM, because there aren't any builds for it in the package repositories. Click the linked icons to find out why.

 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.0a1 Failed View build log
Windows (64-bit)
1.0a1 Failed View build log
Mac OS X (10.5+)
1.0a1 Failed View build log
Linux (32-bit)
1.0a1 Failed View build log
Linux (64-bit)
1.0a1 Failed View build log
 
Links
License
GPL2
Lastest release
version 1.0a1 on Jan 5th, 2011

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

System Message: WARNING/2 (<string>, line 52)

Bullet list ends without a blank line; unexpected unindent.

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

System Message: WARNING/2 (<string>, line 56)

Bullet list ends without a blank line; unexpected unindent.

message into the log. [06.11.2009, jbaumann]

  • It should not fail if there is no primary field value

System Message: WARNING/2 (<string>, line 60)

Bullet list ends without a blank line; unexpected unindent.

[06.11.2009, jbaumann]

  • Added some tests, they are not working well because we test with a plain

System Message: WARNING/2 (<string>, line 63)

Bullet list ends without a blank line; unexpected unindent.

type (without any schemata and without a required file field). [23.10.2009, jbaumann]

  • Added some documentation

System Message: WARNING/2 (<string>, line 67)

Bullet list ends without a blank line; unexpected unindent.

[23.10.2009, jbaumann]

  • Initial implementation

System Message: WARNING/2 (<string>, line 70)

Bullet list ends without a blank line; unexpected unindent.

[22.10.2009, jbaumann]

Subscribe to package updates

Last updated Jan 5th, 2011

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.