Yii Framework Forum: HELP: EUploadifyWidget (fixed path works but not r=controller/action) - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

HELP: EUploadifyWidget (fixed path works but not r=controller/action) Rate Topic: -----

#1 User is offline   mickeyckm 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 25-March 10

Posted 14 April 2010 - 11:57 AM

Hi everyone,

I have this very strange issue. I tried many ways and I finally got a working case, that is:

$this->widget('application.extensions.uploadify.EuploadifyWidget', 
    array(
       'name'=>'uploadme',
       'options'=> array(
            'uploader' => '/www/js/uploadify/uploadify.swf',
            'script' => '/www/js/uploadify/uploadify.php',
            'auto' => true,
            'multi' => false,
            'folder' => '/www/images/',
            'scriptData' => array('extraVar' => 1234, 'PHPSESSID' => session_id()),
            //'fileDesc' => 'Declaratiebestanden',
            //'fileExt' => '*.*',
            'buttonText' => 'Upload',
            //'buttonImg' => '/www/images/upload.gif',
            'width' => 150,
            ),
        'callbacks' => array( 
           'onError' => 'function(evt,queueId,fileObj,errorObj){alert("Error: " + errorObj.type + "\nInfo: " + errorObj.info);}',
           'onComplete' => 'function(e,f){alert("Complete"); console.log(e);console.log(f)}',
           'onCancel' => 'function(evt,queueId,fileObj,data){alert("Cancelled");}',
        )
    ));


However, when I change my 'script' param to point all the URLs below, it didnt work.
    'http://127.0.0.1/index.php?r=controller/action'
    '/index.php?r=controller/action'
    $this->createUrl('controller/action');


In fact, the SWF upload it fine, with the progress bar working and the onComplete return "Complete" alert box, the files are not uploaded.

I'm almost there and would hope to get some advice from experts here. It will be great if you can provide an example of XXXController file with the actionYYY() and how to use the Widget script.

MANY THANKS.

Mickey
0

#2 User is offline   Ray Kwok 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 38
  • Joined: 14-October 09

Posted 03 June 2010 - 11:36 AM

I have the same problem, anybody could help?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users