Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Uploadify IO error on Mac (fix / patch)


3 Posts   4416 Views


Community Member, 52 Posts

17 November 2010 at 10:36am

I ran across an issue when using Uploadify within HasMany/ManyMany FileDataObjectManager fields. I would get an IO error (#2038) on the Mac platform ... but not on Windows/PC.

After trying & reading everything.. it *appears to me* that the issue is related to a character limit of flashvars on the Mac platform.

As a workaround, attached is a patch that shortens the "script" flashvar passed to the [jQuery] Uploadify plugin. In short; it removed superfluous URL info that ComplexTableFields add. E.g. it changes:




Below is the patch to code/UploadifyField.php

Index: www/uploadify/code/UploadifyField.php
--- www/uploadify/code/UploadifyField.php   (revision 145)
+++ www/uploadify/code/UploadifyField.php   (working copy)
@@ -418,8 +418,16 @@

      if($this->form) {
         if(!$this->getSetting('script')) {
-            $this->setVar('script',urlencode(Director::baseURL().Director::makeRelative($this->Link('upload'))));      
+            // long script strings cause IO error on Apple/Mac Flash platforms\
+            // so parse out complextablefield

+            $script = urlencode(Director::baseURL().Director::makeRelative($this->Link('upload')));
+            if($pos = strpos($script,'%3Fctf'))
+            {
+               $script = substr($script,0,$pos);
+            }
+            $this->setVar('script',$script);
         if(!$this->getSetting('refreshlink')) {
            $this->setVar('refreshlink', Director::baseURL().Director::makeRelative($this->Link('refresh')));


Community Member, 52 Posts

20 April 2011 at 8:25am

Cleaned up patch is available @ -- a pull request has been sent to get this into the official Uploadify git repository at GitHub. New patch is more effective.


Community Member, 8 Posts

6 December 2011 at 12:59am

Thanks so much for this, brice. This just got us out of a little bind that otherwise might've taken ages.

Cheers dude (: