Temporary patch for flash 10 bug and ATCT filesΒΆ

Tags: plone

Yesterday, somehow my flash file (uploaded to plone as a regular file) wouldn't display itself. I was using the same embed and object tags as on a local filesystem test html file, so why oh why...

Some googling gave me a blog post that told me it was a recent flash 10 security feature that interacted badly with atcontenttype's default file content type. There's a easy fix that'll go into the next version of atcontenttypes.

I needed a fix Right Now, though, so I made the following quick patch. If you need it: add it as patch.py to your product and just do an import patch in your __init__.py. The patch:

  from Products.ATContentTypes.content.file import ATFile

  # This patch adds flash files as inline types.
  # See http://dev.plone.org/plone/ticket/8624
  ATFile.inlineMimetypes= ('application/msword',
                           'application/x-msexcel', # ?
                           'application/vnd.ms-excel',
                           'application/vnd.ms-powerpoint',
                           'application/pdf',
                           'application/x-shockwave-flash')

  print "PATCHED ATCT'S FILE FOR FLASH INLINE BUG"
  print "See http://dev.plone.org/plone/ticket/8624"

(Old imported comments)
"Fix now available in a product" by http://jonstahl.wordpress.com/ on 2009-01-30 22:53:43
David Glick wrapped up this fix into a simple installable product: http://plone.org/products/products-flash10fix
 
vanrees.org logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):