[CLOSED] Opera and FileUpload

  1. #1

    [CLOSED] Opera and FileUpload

    Hello
    are you aware of any problems with Opera and FileUpload control?

    I'm getting the same problems like the one described in the
    http://forums.ext.net/showthread.php...a-last-version

    Steps to reproduce are quite simple:

        <ext:Window runat="server" Width="550" Height="100">
                
                <Items>
                    <ext:FileUploadField runat="server" ID="fup"></ext:FileUploadField>
                    <ext:Button runat="server" OnDirectClick="btn_click"></ext:Button>
                </Items>
            </ext:Window>
    (and defining empty server event)

    I reproduced this on two computers, with latest opera installed
    (opera 12 taken from http://www.opera.com/)

    thanks
    Last edited by Daniil; Sep 25, 2012 at 6:51 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Could you, please, clarify what exactly happens on your side with Opera + FileUploadField combination?
  3. #3
    see the attachment, it appears after clickin the button
    Attached Thumbnails Click image for larger version. 

Name:	opera.jpg 
Views:	67 
Size:	29.2 KB 
ID:	4796  
  4. #4
    Thank you.

    Does it work with other major browsers? Please investigate requests. What is the difference?
  5. #5
    Yes, FF, Chrome and IE is fine
    It works for you in opera? I tried on couple coputers, with latest opera and it does not work

    Unfortunatelly I don't know how to push opera to log request in fiddler
  6. #6
    Quote Originally Posted by aisi_it_admin View Post
    Unfortunatelly I don't know how to push opera to log request in fiddler
    There is the built-in DragonFly, an analog of developer tools and FireBug.
    http://www.opera.com/dragonfly/documentation/

    Quote Originally Posted by aisi_it_admin View Post
    Yes, FF, Chrome and IE is fine
    It works for you in opera?
    I reproduced it in Opera as well. Thank you for the report. There is a bug in ExtJS 4.1.1 which appears to be fixed in 4.1.2. Yesterday, we incorporate ExtJS 4.1.2 into the 2.1 branch. Please update.

    Though, I think there is still an issue. I reported it to Sencha.
    http://www.sencha.com/forum/showthread.php?243074

    To fix it please use the following script for now.

    Fix
    <script type="text/javascript">
        Ext.data.Connection.override({
            onUploadComplete: function(frame, options) {
                var me = this,
                    // bogus response object
                    response = {
                        responseText: '',
                        responseXML: null
                    }, doc, contentNode;
    
                try {
                    doc = frame.contentWindow.document || frame.contentDocument || window.frames[frame.id].document;
                    // Opera will fire an extraneous load event on about:blank
                    // We want to ignore this since the load event will be fired twice
                    if (doc) {
                            if (Ext.isOpera && doc.location == 'about:blank') {
                                return;
                            }
                        if (doc.body) {
    
                            // Response sent as Content-Type: text/json or text/plain. Browser will embed in a <pre> element
                            // Note: The statement below tests the result of an assignment.
                            if ((contentNode = doc.body.firstChild) && /pre/i.test(contentNode.tagName)) {
                                response.responseText = contentNode.innerText;
                            }
    
                            // Response sent as Content-Type: text/html. We must still support JSON response wrapped in textarea.
                            // Note: The statement below tests the result of an assignment.
                            else if ((contentNode = doc.getElementsByTagName('textarea')[0])) {
                                response.responseText = contentNode.value;
                            }
                            // Response sent as Content-Type: text/html with no wrapping. Scrape JSON response out of text
                            else {
                                response.responseText = doc.body.textContent || doc.body.innerText;
                            }
                        }
                        //in IE the document may still have a body even if returns XML.
                        response.responseXML = doc.XMLDocument || doc;
                    }
                } catch (e) {
                }
    
                me.fireEvent('requestcomplete', me, response, options);
    
                Ext.callback(options.success, options.scope, [response, options]);
                Ext.callback(options.callback, options.scope, [options, true, response]);
            
                // If we get this far it means the load event has fired properly, so remove it
                if (Ext.isOpera) {
                    Ext.fly(frame).un("load", this.onUploadComplete, this);
                }
    
                setTimeout(function() {
                    Ext.removeNode(frame);
                }, 100);
            }
        });
    </script>
  7. #7
    It should be fixed in SVN.

    So, you can remove the suggested fix from the page.

Similar Threads

  1. [CLOSED] Problem under Opera last version
    By feanor91 in forum 2.x Legacy Premium Help
    Replies: 32
    Last Post: Jul 13, 2012, 1:22 PM
  2. Coolite doesn't work in Opera
    By jytu in forum 1.x Help
    Replies: 2
    Last Post: Jun 15, 2010, 2:09 PM
  3. Collite in Opera?
    By jytu in forum 1.x Help
    Replies: 0
    Last Post: Jun 15, 2010, 9:06 AM
  4. Request Failure in Opera
    By Dgsoft.ru in forum 1.x Help
    Replies: 2
    Last Post: Jul 30, 2009, 5:37 AM
  5. Still no workaround for Opera context menu "bug"?
    By juanpablo.belli@huddle.com.ar in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 04, 2009, 11:25 PM

Posting Permissions