Results 1 to 6 of 6

Thread: ExtJs3. Defect when the upload file

  1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    16

    Exclamation ExtJs3. Defect when the upload file

    To upload a file using inputType: 'file', and for a form prescribed fileUpload: true. Everything works fine, the file is saved. But after saving the file block success (from ajax request) is not satisfied. Ie all the stops to waitMsg: 'Saving Data ...'.

    What could be wrong?

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    Did you return {success : true} or anything?
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    16

    Default

    Yes, return:
    PHP Code:
    $this->getResponse()->setBody(Zend_Json::encode(array('success'=>true,'msg'=>""))); 

  4. #4
    Sencha User
    Join Date
    Sep 2011
    Posts
    16

    Default

    what could be wrong?

  5. #5
    Sencha User
    Join Date
    Sep 2011
    Posts
    16

    Default

    displays an error

    PHP Code:
    missingin XML expression - (
      
    apparently the answer must be no json and xml 

  6. #6
    Sencha User
    Join Date
    Sep 2011
    Posts
    16

    Exclamation decided

    somehow helped change content-type to application / json to text / html

    Example for ZF:
    PHP Code:
    public function preDispatch() {
            
    $this->_helper->viewRenderer->setNoRender();
            
    $this->_helper->getHelper('layout')->disableLayout();

            
    $this->getResponse()->setHeader('Content-Type'
                    
    'text/html; charset=utf-8'); // here
            
    Zend_Registry::set("is_json_response"true); 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •