1. #771
    Ext User
    Join Date
    Feb 2008
    Posts
    15
    Vote Rating
    0
    fraric is on a distinguished road

      0  

    Default


    thanks for the reply, I wanted to know if more forward had plans to redo the component, or know why the developer has added the code for Restore form attributes after doFormUpload
    , or you can ask at developer the reason for this choice?
    I just want to understand how to move before you change the code
    Thanks in advanced for your reply

  2. #772
    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


    I needed to change that part of the code in that version of Ext (2.2). Try to apply the patch of the above thread author.

    FYI, if and when I port this to Ext 3.x, I'll revise all the code removing unnecessary parts and adding new parts. In other words, it will be new uploader. For the time being, just use what works.
    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. #773
    Ext User
    Join Date
    Feb 2008
    Posts
    15
    Vote Rating
    0
    fraric is on a distinguished road

      0  

    Default


    I had the same problem I solved

    Code:
    	    // multipleUpload - each file uploaded in it's own form
    	    else {
    	        if (error && 'object' === Ext.type(error)) {
    	            record.set('error', error.errors && error.errors[record.id] ? error.errors[record.id] : this.unknownErrorText);
    	        }
    	        else if (error) {
    	            record.set('error', error);
    	        }
    	        else if (response && response.responseText) {
    	            record.set('error', response.responseText);
    	        }
    	        else {
    	            record.set('error', this.unknownErrorText);
    	        }
    	        record.set('state', 'failed');
    	        this.deleteForm(options.form,record);/*Add this line remove refence in form*/
    	        record.commit();
    	    }
    and in upload file
    Code:
    	, uploadFile: function(record, params) {
    	    // fire beforestart event
    	    if (true !== this.eventsSuspended && false === this.fireEvent('beforefilestart', this, record)) {
    	        return;
    	    }
    	    // create form for upload
    	    var form = this.createForm(record);
    	    // append input to the form
    	    var inp = record.get('input');
    	    inp.set({ name: inp.id });/*inp.dom.name || */
    	    /*Use appendTo and not append in some case when there's an error input lose value property id form it's not destroy correctly
    	    form.appendChild(inp);
    	    */
    	    inp.appendTo(form);
    if you apply only this code seems uploader function every time but i think it's better add this.deleteForm

    I dont understand why if you use a form.appendChild(inp); there's an error and if you use directly inp.appendTo(form) there's not an error

    this is append childFunction
    Code:
            appendChild: function(el)
            {
                el = Ext.get(el);
                el.appendTo(this);
                return this;
            },

    Quote Originally Posted by zombeerose View Post
    I encountered an issue in Chrome when trying to upload because it fails when trying to encode the form during the record.set operation. I think IE also bombs during the encode. I have reported this to ext (http://www.extjs.com/forum/showthread.php?p=395726)

    In the meantime, below are my (hack) changes to the FileUploader.js that address both the IE & Chrome issues.

    * Replace:
    Code:
    record.set('form', form);
    * With:
    Code:
    record.form = form;
    * Replace:
    Code:
    record.set('form', null);
    * With:
    Code:
    delete record.form;
    * Replace:
    Code:
    var form = record.get('form');
    * With:
    Code:
    var form = record.form;
    If anyone has a better suggestion, please feel free.

  4. #774
    Sencha User
    Join Date
    May 2008
    Posts
    27
    Vote Rating
    0
    nescha is on a distinguished road

      0  

    Default Error on rename

    Error on rename


    If you want to use "beforerename" functionality for renaming, oldName and newName aren't supplied with valid values. Inspect file Ext.ux.FileTreePanel.js at line 952.
    Regex value shouldn't be /\/[^\\]+$/ but /\/[^\/]+$/ (escaping of backslash instead of slash in the square brackets).
    You can test this behavior i.e. on path "Docarchive Root/Your files/Mosor"

  5. #775
    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


    It would be good idea to add backslash but you shouldn't remove slash. I use Linux servers where backslash is innocent and slash is path separator.
    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


  6. #776
    Sencha User
    Join Date
    May 2008
    Posts
    27
    Vote Rating
    0
    nescha is on a distinguished road

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    It would be good idea to add backslash but you shouldn't remove slash. I use Linux servers where backslash is innocent and slash is path separator.
    I mis-expressed myself (or you misunderstood ): your code has backslash escaped in the square brackets. Instead of backslash, slash should be put (like it is for stated in start of the expression)

  7. #777
    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


    Aah, I see. I've looked only inside the brackets before. Yes, you're right.
    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. #778
    Ext User
    Join Date
    Sep 2008
    Posts
    1
    Vote Rating
    0
    voidus is on a distinguished road

      0  

    Default


    Hello.
    I've made a patch against:
    • Ext.ux.FileUploader.js
    • Ext.ux.form.BrowseButton.js
    • Ext.ux.UploadPanel.js
    which makes use of "multiple" attribute of <input type="file" tag and File API, introduced in Firefox 3.6, and allows to select multiple files at once at file dialog.
    I'd like to share that patch (see attachment).
    Patch requires changes of server side to work. I may share example if anyone need it.
    To use File API developer must explicitly set the "useFileApi" attribute of UploadPanel instance. The best detection string if we may allow File API or not is probably following condition:
    Code:
    var useFileApi = typeof window.FileReader == 'function';
    Disclaimer: implementation is far from perfect, not all possible features implemented. But it works.
    Attached Files

  9. #779
    Ext User
    Join Date
    Jun 2009
    Posts
    102
    Vote Rating
    0
    js_coder is on a distinguished road

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    if and when I port this to Ext 3.x
    Any sort of a timeline on this? I really appreciate the high-quality work, but I need to decide whether it's time to upgrade this myself for 3.x after many months of hearing this.

  10. #780
    Sencha User
    Join Date
    Oct 2009
    Posts
    6
    Vote Rating
    0
    lxfliu is on a distinguished road

      0  

    Default


    Quote Originally Posted by Bobrovnik View Post
    After a day of trying to find out mistake. I have made some changes to FileTree extention, so now it works with Extjs 3.0 version.

    In file Ext.ux.FileTreeMenu.js

    PHP Code:
     var uploadPanelConfig = {
     
    contextmenu:this
    ,buttonsAt:config.buttonsAt || 'tbar'
     
    ,singleUpload:config.singleUpload || false
     
    ,maxFileSize:config.maxFileSize
     
    ,enableProgress:config.enableProgress
     
    }; 
    should be replaced with
    PHP Code:
    var uploadPanelConfig = {
            
    hideOnClick:false
            
    ,cmd:'upload-panel'
            
    ,contextmenu:this
            
    ,buttonsAt:config.buttonsAt || 'tbar'
            
    ,singleUpload:config.singleUpload || false
            
    ,maxFileSize:config.maxFileSize
            
    ,enableProgress:config.enableProgress
        
    }; 
    PHP Code:
     ,new Ext.menu.Adapter(new Ext.ux.UploadPanel(uploadPanelConfig), {
      
    hideOnClick:false
      
    ,cmd:'upload-panel'
    }) 
    with
    PHP Code:
    ,new Ext.ux.UploadPanel(uploadPanelConfig
    in file Ext.ux.FileTreePanel.js

    PHP Code:
    this.uploadPanel this.contextmenu.getItemByCmd('upload-panel').component
    replace with
    PHP Code:
    this.uploadPanel this.contextmenu.getItemByCmd('upload-panel'); 
    in file Ext.ux.FileUploader.js

    PHP Code:
    record.set('form'form); 
    with
    PHP Code:
    if(Ext.isIE)
        
    record.set('form'undefined);  // IE fix, without this it throws an exception
    else
        
    record.set('form'form); 
    in file Ext.ux.form.BrowseButton.js

    PHP Code:
       this.buttonCt this.el.child('.x-btn-center em'); 
    with
    PHP Code:
    this.buttonCt this.el.child('.x-btn-mc em'); 
    PHP Code:
    style: {
       
    position'absolute',
       
    cursor'pointer',
       
    right'0px',
       
    top'10px'

    with
    PHP Code:
    style: {
       
    position'absolute',
       
    cursor'pointer',
       
    right'0px',
       
    topExt.isIE '10px' :'0px' // Also another IE fix

    in file Ext.ux.UploadPanel.js Add line

    PHP Code:
    this.ownerCt.doLayout(); 
    PHP Code:
    ,onAddFile:function(bb) {
            
            if(
    true !== this.eventsSuspended && false === this.fireEvent('beforefileadd'thisbb.getInputFile())) {
                return;
            }
            var 
    inp bb.detachInputFile();
            
    inp.addClass('x-hidden');
            var 
    fileName this.getFileName(inp);

            
    // create new record and add it to store
            
    var rec = new this.store.recordType({
                 
    input:inp
                
    ,fileName:fileName
                
    ,filePath:this.getFilePath(inp)
                ,
    shortNameExt.util.Format.ellipsis(fileNamethis.maxLength)
                ,
    fileCls:this.getFileCls(fileName)
                ,
    state:'queued'
            
    }, inp.id);
            
    rec.commit();
            
    this.store.add(rec);

            
    this.syncShadow();

            
    this.uploadBtn.enable();
            
    this.removeAllBtn.enable();
            
            
    this.ownerCt.doLayout();
            
            if(
    true !== this.eventsSuspended) {
                
    this.fireEvent('fileadd'thisthis.storerec);
            }

        } 
    // eo onAddFile 
    PLS help me

    The upload listed files aline have the problem.

    Sees Attachments
    Attached Images

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)