Attention

This document was written for an old version of Plone, Plone 2.5.x, and was last updated 898 days ago.

To learn how to upgrade to the current version of Plone, read the upgrade manual.

Fixing Plone's publishing of Flash content in Plone 3.1.6 and earlier

by Jim Nelson last modified Dec 06, 2009 09:39 PM
How to make Flash Player 10 display Flash content uploaded as content to the site.

Purpose

Per http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes_02.html#head32, Adobe has restricted the ways in which Flash content can be provided.  Specifically, Flash Player 10 will ignore all .swf files provided with the 'Content-Disposition: attachment' HTTP response header.

What does this mean?

It means that any .swf files uploaded to a Plone site as a Plone content object will no longer work.

Prerequisities

This works in Plone 2.5, 3.0, and 3.1 up to 3.1.6.  This fix will likely be integrated into a future release of ATContentTypes.

Step by step

You'll need to edit a python script to make it work - Products/ATContentTypes/content/file.py.

 

In the ATFile class, you'll see the following attribute:

 

    inlineMimetypes= ('application/msword',
                      'application/x-msexcel', # ?
                      'application/vnd.ms-excel',
                      'application/vnd.ms-powerpoint',
                      'application/pdf)

 

Change it to add the 'application/x-shockwave-flash' content type, as such:

 

    inlineMimetypes= ('application/msword',
                      'application/x-msexcel', # ?
                      'application/vnd.ms-excel',
                      'application/vnd.ms-powerpoint',
                      'application/pdf',
                      'application/x-shockwave-flash')

 

Restart your Plone instance, and it's fixed!

 

 

Further information

This issue was originally indicated at http://www.littled.net/new/2008/10/17/plone-and-flash-player-10/.  Thanks to David Little for figuring out what was going wrong, and mentioning is in his blog.  It would have taken much longer to figure out how to fix this without that information.


Contribute

Something wrong or out of date? Anybody can edit or create a new article in the knowledge base. Simply create an account on this site, log in, and click the Edit button to contribute.