1. #691
    Ext User
    Join Date
    Jun 2008
    Posts
    36
    Vote Rating
    0
    BrainDrain is on a distinguished road

      0  

    Default ASP.NET

    ASP.NET


    Hi
    I'm trying to implement ASP.NET server side app for filetree & upload(panel)
    At first steps I've created HttpHandler that successfully handles post requests from client and responds with json object. It uploads files correctly but synchronously (client is waiting for handler response), enableProgress=false.
    After that I've created HttpModule that catches upload requests and initiates uploading in backgroung. It works with HttpHandler fine, client receives progress (changed in web session cache by HttpModule background thread) from HttpHandler. The problem is: when I abort uploading (of large file, for ex.) - uploading keep processing. I couldn't catch request cancelling on server (HttpPostedFile object stream is alive, request object has no disconnecting indicators) without some special command request from client. Am I right?
    And one more thing. singleUpload = true caused request timed out exceptions on request object operations (in ASP.NET), even if posting files is very small. Could some one explain that? (and how to fix that?)
    TIA

  2. #692
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,538
    Vote Rating
    380
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Sorry, I'm on Linux and I don't use M$ "products" except hardware ones.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  3. #693
    Ext User
    Join Date
    Jun 2008
    Posts
    36
    Vote Rating
    0
    BrainDrain is on a distinguished road

      0  

    Default


    How you aborting background uploading process in your php frontend? Maybe your answer can help me.
    + a little 'bugs'
    - right click menu (with embedded upload panel) doesn't appear in opera 9
    - 'remove all uploads' button removes 'add' button from toolbars (instead of removing only records)
    - 'add upload' button sometimes works only after 1-2-3 clicks (in IE, for ex.), and it won't work in Opera at all

  4. #694
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,538
    Vote Rating
    380
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Quote Originally Posted by BrainDrain View Post
    How you aborting background uploading process in your php frontend? Maybe your answer can help me.
    I do nothing on server. Just stop() on hidden iframe at client.
    + a little 'bugs'
    - right click menu (with embedded upload panel) doesn't appear in opera 9
    It's Opera problem - they have blocked context menus.
    - 'remove all uploads' button removes 'add' button from toolbars (instead of removing only records)
    - 'add upload' button sometimes works only after 1-2-3 clicks (in IE, for ex.), and it won't work in Opera at all
    These are BrowseButton bugs - I won't use it in the next version.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  5. #695
    Ext User
    Join Date
    Jul 2008
    Posts
    1
    Vote Rating
    0
    romulodelazzari is on a distinguished road

      0  

    Smile


    Hi Saki,

    I'm using only the UploadPanel in my application and I need to pass a parameter when I click the upload button, I'm trying to use the baseParams without success, because in php this parameter don't exist.

    Here is my code:

    PHP Code:
    meuUploadPanel = new Ext.ux.UploadPanel({
        
    buttonsAt:'tbar',
         
    id:'uppanel',
          
    url:'page.php',
        
    path:'root',
        
    maxFileSize:1048576,
        
    listeners:{
            
    allfinished: function(){
                
    anexoSeStore.reload({
                    
    params:{
                        
    hidden_ttnumeroTTSelecionado
                    
    }
                });
            },
            
    beforeallstart: function(){
                
    this.baseParams = {
                    
    hidden_tt'1234'
                
    }
            }
        }
    }); 
    Thanks for any help

  6. #696
    Ext User
    Join Date
    Aug 2008
    Posts
    5
    Vote Rating
    0
    khurri.saleem is on a distinguished road

      0  

    Default Issue with IE8

    Issue with IE8


    Hello Saki,

    I hope every one out there must have experienced the issue of browse button with IE8. However your example online works but a simple example locally dont works at all.

    I need help with IE 8 and i am really stuck please help !

    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml" >
    <
    head runat="server">
    <
    title></title>
    <
    link rel="stylesheet" type="text/css" href="Ext/resources/css/ext-all.css"/> 
     
     
    <
    script type="text/javascript" src="Ext/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="Ext/ext-all.js"></script>
     
    <script type="text/javascript" src="js/Ext.ux.FileUploader.js"></script>
    <script type="text/javascript" src="js/Ext.ux.UploadPanel.js"></script>
    <script type="text/javascript" src="js/Ext.ux.form.BrowseButton.js"></script>
    </head>
    <body>
    <script language="javascript" type="text/javascript">
    // window with uploadpanel
    var win = new Ext.Window({
    width: 180
    , minWidth: 165
    , id: 'winid'
    , height: 220
    , minHeight: 200
    , layout: 'fit'
    , border: false
    , closable: false
    , title: 'UploadPanel'
    , iconCls: 'icon-upload'
    , items: [{
    xtype: 'uploadpanel'
    , buttonsAt: 'tbar'
    , id: 'uppanel'
    , path: 'root'
    , maxFileSize: 1048576
     
    }]
    });
    win.show.defer(500, win);
    </script> 
    </body>
    </html> 

  7. #697
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,538
    Vote Rating
    380
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    First, remove the doctype.

    I will replace BrowseButton with Ext native file input in the next release - some time after Ext 3.0 final is released.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  8. #698
    Sencha User
    Join Date
    Nov 2008
    Posts
    13
    Vote Rating
    0
    deemonas is on a distinguished road

      0  

    Default To help port it to Ext 3.0

    To help port it to Ext 3.0


    Hi all,

    I just tried to run it under 3.0rc2.

    The problem is that Ext.ux.UploadPanel is just a Ext.Panel rendered in place of the Ext.menu.BaseItem.

    In this case Ext3.0 DOES NOT RENDER toolbar for the Panel. Try this under Ext 2.x and Ext 3.0:

    Code:
    viewport = new Ext.Viewport( {
        layout: 'absolute',
        renderTo: Ext.getBody(),
        items : 
        [
        {
        region: 'center',
        html: 'HA HA',
        tbar: 
             new Ext.Toolbar
             ({
                    items:
                     [
                    {
                        text: 'Managers',
                        iconCls: 'bmenu',
                        // Menus can be built/referenced by using nested menu config objects
                        menu : 
                        {
                            items: 
                            [
                                {text: 'Template Manager' },
                                {text: 'Site &amp; Page Manager'},
                                {
                                    xtype: 'panel',
                                    id: 'mypanel',
                                    html: 'you see just blue line and no button. Ugh.',
                                    tbar: [{text: 'button ???'}]
                                }
                            ]    
                           }
                       }
                       ]
            })
        }
        ]
    });
    It might be even a bug in EXT 3.0

    To solve it I made 2 small changes
    1. in Ext.ux.UploadPanel.onRender
    add one line to force toolbar get rendered:

    Code:
    onRender:function() {
            // call parent
            Ext.ux.UploadPanel.superclass.onRender.apply(this, arguments);
    
            // save useful references
            var tb = 'tbar' === this.buttonsAt ? this.getTopToolbar() : this.getBottomToolbar();
            
            this.addBtn = Ext.getCmp(tb.items.first().id);
            this.uploadBtn = Ext.getCmp(tb.items.itemAt(1).id);
            this.removeAllBtn = Ext.getCmp(tb.items.last().id);
            //FIXME ExtJs 3.0 does not render it automatically !!!
            // f*ck knows why, so force toolbar to be rendered
            tb.doLayout(false,true);
        }
    2. Ext 3.0 uses a bit different HTML for buttons, ajust code in
    Ext.ux.form.BrowseButton.onRender

    use
    Code:
    this.buttonCt = this.el.child('.x-btn-mc em');
    instead of
    Code:
    this.buttonCt = this.el.child('.x-btn-center em');
    At least it worked for me.

  9. #699
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,538
    Vote Rating
    380
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Thank you for the data - I'll get back to it when I'll port it to Ext 3.0.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  10. #700
    Ext User
    Join Date
    Jun 2009
    Posts
    3
    Vote Rating
    0
    Phatnine is on a distinguished road

      0  

    Default


    Hello

    Good job Saki on this great extension.

    I'm using your extension in a webGIS project. I want users to be able to upload their GIS data into a temporary folder. The problem is I can't seem to filter the file extension. I just want GML, SHP, TIF, etc, but not EXE or ZIP... Is there a config option that lets me filter the file extensions? Is there a class documentation?

    Also, how can I see the response from my php backend? I need to see it because I have a ''Cannot decode JSON object'' when I try uploading a file.

    The window looks like this:
    Code:
                var win = new Ext.Window({
                    width:400,
                    height:300,
                    autoScroll:true,        
                    title: 'Add a layer',
                    id:'window',
                    listeners:{
                        hide:function(){
                            gpxButton.enable();
                        }
                    },
                    items:[{
                        xtype:'uploadpanel'
                        ,buttonsAt:'tbar'
                        ,name:'uppanel'
                        ,iconCls:'icon-upload'
                        ,id:'uppanel'
                        ,url:'filetree.php'
                        ,maxFileSize:1048576
                        ,enableProgress:false
                        ,baseParams:[{
                            filename:'uppanel',
                            path: 'root'
                        }]
                    }]
                })            
                win.show();
    And my php backend is:
    PHP Code:
    <?php
    if ($_FILES["uppanel"]["error"] > 0)
      {
      echo 
    "Error: " $_FILES["uppanel"]["error"] . "<br />";
      }
    else
      {
      echo 
    "Upload: " $_FILES["uppanel"]["name"] . "<br />";
      echo 
    "Type: " $_FILES["uppanel"]["type"] . "<br />";
      echo 
    "Size: " . ($_FILES["uppanel"]["size"] / 1024) . " Kb<br />";
      echo 
    "Stored in: " $_FILES["uppanel"]["tmp_name"];
      }
    ?>
    Thank you,

    Maxime
    Last edited by Phatnine; 26 Jun 2009 at 10:20 AM. Reason: add a question

Thread Participants: 173

  1. danvega (10 Posts)
  2. jay@moduscreate.com (1 Post)
  3. jweber (1 Post)
  4. jt (1 Post)
  5. slacker775 (2 Posts)
  6. vmorale4 (12 Posts)
  7. stever (2 Posts)
  8. Dumbledore (9 Posts)
  9. ismoore (1 Post)
  10. mystix (8 Posts)
  11. sdrew (3 Posts)
  12. mxracer (1 Post)
  13. Foggy (3 Posts)
  14. madrabaz (8 Posts)
  15. Thorsten (4 Posts)
  16. Fabyo (1 Post)
  17. mschaefer (11 Posts)
  18. tchitani (3 Posts)
  19. loeppky (11 Posts)
  20. damsfx (1 Post)
  21. cmendez21 (7 Posts)
  22. anjelika (3 Posts)
  23. randcasburn (3 Posts)
  24. mjlecomte (3 Posts)
  25. esoteric (10 Posts)
  26. pravin_bluebird (1 Post)
  27. ZooKeeper (4 Posts)
  28. george.antoniadis (1 Post)
  29. fermo111 (1 Post)
  30. glaforge (2 Posts)
  31. Spirit (1 Post)
  32. newc_k (1 Post)
  33. adam.jimenez (9 Posts)
  34. juandj (10 Posts)
  35. rballman (2 Posts)
  36. Michelangelo (6 Posts)
  37. kk_kkk (7 Posts)
  38. issomesmo (5 Posts)
  39. mashiki (1 Post)
  40. juljupy (2 Posts)
  41. cafebabe (1 Post)
  42. ferrenliu (1 Post)
  43. smartlit (14 Posts)
  44. chunkT (1 Post)
  45. mankz (6 Posts)
  46. luisparada (4 Posts)
  47. iDevelopment (4 Posts)
  48. cblin (9 Posts)
  49. ljaeren (2 Posts)
  50. endlichstudent (9 Posts)
  51. RacingTomcat (1 Post)
  52. lobo-tuerto (5 Posts)
  53. maximumcoder (1 Post)
  54. calavera (3 Posts)
  55. ningle (5 Posts)
  56. jbird526 (4 Posts)
  57. sekundek (8 Posts)
  58. GokhanNL (1 Post)
  59. markkl (1 Post)
  60. basshcm (2 Posts)
  61. dbraiden (2 Posts)
  62. incaic (2 Posts)
  63. silcreval (6 Posts)
  64. sirioz10 (2 Posts)
  65. iulian (2 Posts)
  66. hsurya (7 Posts)
  67. johnrembo (2 Posts)
  68. fraric (4 Posts)
  69. Silver Paladin (5 Posts)
  70. Rafael (2 Posts)
  71. treqx (1 Post)
  72. spectrus (6 Posts)
  73. JoyfulBobHome (2 Posts)
  74. fxlacroix (3 Posts)
  75. jove4015 (1 Post)
  76. rtrocc (12 Posts)
  77. carl23934 (1 Post)
  78. ClemsonJeeper (1 Post)
  79. lagos.tout (2 Posts)
  80. craigharmonic (3 Posts)
  81. siebertm (3 Posts)
  82. zombeerose (11 Posts)
  83. keckeroo (1 Post)
  84. dotchris (7 Posts)
  85. fallenone (4 Posts)
  86. yhwh (1 Post)
  87. harirama (2 Posts)
  88. scroll (1 Post)
  89. mlim1972 (4 Posts)
  90. Arthur.Blake (1 Post)
  91. nileshgund (1 Post)
  92. blow (1 Post)
  93. piyushjain7 (1 Post)
  94. njeriextjs (3 Posts)
  95. hileon (1 Post)
  96. bomka (15 Posts)
  97. --maty (1 Post)
  98. WhiteRussian (1 Post)
  99. kpopov (1 Post)
  100. captainfish (5 Posts)
  101. Gosa (5 Posts)
  102. extjsF4n (1 Post)
  103. Chida (1 Post)
  104. Nthalk (2 Posts)
  105. nescha (2 Posts)
  106. jorgemuza (3 Posts)
  107. Eric24 (1 Post)
  108. edui (1 Post)
  109. shadoi (4 Posts)
  110. acidfilez (1 Post)
  111. BrainDrain (2 Posts)
  112. dimitrij.zub (1 Post)
  113. ixnixnixn (2 Posts)
  114. calicoder (2 Posts)
  115. wes (1 Post)
  116. mammerman (1 Post)
  117. Voronchuk (3 Posts)
  118. jwmianzu (3 Posts)
  119. gnomie (2 Posts)
  120. pflammer (2 Posts)
  121. The0s (2 Posts)
  122. gogogo521 (1 Post)
  123. tegel (2 Posts)
  124. wulfshayde (2 Posts)
  125. mikecx (2 Posts)
  126. paul@demiduk.com (1 Post)
  127. romulodelazzari (1 Post)
  128. sabline (2 Posts)
  129. mikecc (8 Posts)
  130. dan.plifeye (2 Posts)
  131. JGALFO (1 Post)
  132. Stephan Schrade (3 Posts)
  133. khurri.saleem (1 Post)
  134. voidus (1 Post)
  135. Shockdoc1 (1 Post)
  136. dport (3 Posts)
  137. jahman (3 Posts)
  138. Pachat (4 Posts)
  139. BIS (1 Post)
  140. sanraj (4 Posts)
  141. deemonas (1 Post)
  142. jpipas (2 Posts)
  143. martinrame (2 Posts)
  144. MrEnirO (2 Posts)
  145. elona (1 Post)
  146. cwford (6 Posts)
  147. triptonemeister (2 Posts)
  148. gonzalez (1 Post)
  149. wallacer (1 Post)
  150. Natalie (2 Posts)
  151. Phatnine (2 Posts)
  152. js_coder (3 Posts)
  153. Bobrovnik (4 Posts)
  154. kender (1 Post)
  155. avsomeren (2 Posts)
  156. rkulkarni (2 Posts)
  157. lxfliu (2 Posts)
  158. pbaker99 (2 Posts)
  159. naf305 (2 Posts)
  160. cybervirax (1 Post)
  161. AmrMostafa (1 Post)
  162. tumbochka (1 Post)
  163. exdelierium (1 Post)
  164. toubeau (4 Posts)
  165. nosferatum (1 Post)
  166. Boy.Kortman (1 Post)
  167. erlinis (1 Post)
  168. nhocoi (2 Posts)
  169. varunach (1 Post)
  170. _DR_ (1 Post)
  171. rodenp (1 Post)
  172. tutuianu_daniel (1 Post)
  173. Shabneez (2 Posts)