1. #581
    Ext User
    Join Date
    Nov 2008
    Posts
    88
    Vote Rating
    0
    sanraj is on a distinguished road

      0  

    Default File uploadpanel

    File uploadpanel


    Hi saki,

    I have done code for one by one upload

    Code:
    
    
    ,manageUpload:
    function(){ var recordIndex = this.store.find( 'status', 0, 0 ); if(recordIndex != -1){ var record = this.store.getAt(recordIndex); this.uploadFile(record, this);
    if(true === this.enableProgress) { this.startProgress(); } }
    }
    But I want to call requestProgress(); method atleast one time while uploading to get file Size when upoading starts. It fails if file is small.

    How can i get file size from the server for every upload?

    Thanks

  2. #582
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,133
    Vote Rating
    322
    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 depends on your server implementation but generally you can send an Ajax request and process the response which should contain the size.

  3. #583
    Ext User
    Join Date
    Nov 2007
    Location
    Cologne, Germany
    Posts
    19
    Vote Rating
    0
    iDevelopment is on a distinguished road

      0  

    Default


    Hi Saki...

    First: Nice work and nice support! Keep on the good work!

    I've got a (i doubt very stupid) problem - I'm working on a Connection to our CMS to upload files with the UploadPanel...

    My Object looks like this:

    [CODE]

    this.pn_Upload = new Ext.ux.UploadPanel
    ({
    url:'/cgi-bin/index.pl',
    cmd: 'upload',
    id:'up_upload' + this.instanceName,
    path:'root',

    baseParams:
    {
    SID: this.sid,
    COMMAND: 'INTOS_V5_UPLOADPANEL',
    },

    singleUpload: false,
    enableProgress: false,
    clickRemoveText:'Hier klicken zum entfernen.',
    addText:'Hinzuf
    R2D2 aka Stephan Baltzer
    iDEDV - EDV-Entwicklungen Baltzer & Klein (CEO)

  4. #584
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,133
    Vote Rating
    322
    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


    baseParams should be propagated down to FileUploader:
    PHP Code:
            // create uploader
            
    var config = {
                 
    store:this.store
                
    ,singleUpload:this.singleUpload
                
    ,maxFileSize:this.maxFileSize
                
    ,enableProgress:this.enableProgress
                
    ,url:this.url
                
    ,path:this.path
            
    };
            if(
    this.baseParams) {
                
    config.baseParams this.baseParams;
            }
            
    this.uploader = new Ext.ux.FileUploader(config); 
    You can check if they really are.

  5. #585
    Ext User
    Join Date
    Nov 2007
    Location
    Cologne, Germany
    Posts
    19
    Vote Rating
    0
    iDevelopment is on a distinguished road

      0  

    Default


    I did... And even in the Ext.ajax.Request they still exist... But i can't get them on the serverside and even the Firebug Console ( I can see the request ONLY under network ) tells me there are no post request params...


    EDIT!!!!!!!!!!!!!

    TESTED IN CHROME (SINCE I GOT SOME IE-BUGS, I CAN'T USE IE FOR TESTING) - IT SEEMS TO WORK - I'M GETTING THE SID PARAM...

    IS THIS A FIREFOX V3 BUG???

    EDIT2!!!!

    G
    R2D2 aka Stephan Baltzer
    iDEDV - EDV-Entwicklungen Baltzer & Klein (CEO)

  6. #586
    Ext User
    Join Date
    Nov 2007
    Location
    Cologne, Germany
    Posts
    19
    Vote Rating
    0
    iDevelopment is on a distinguished road

      0  

    Default


    Sorry for my shouting ^^ This made me crazy... Uploads working fine!

    I've got something to contribute i'm missing:

    Why is there no filefinished event? I relayed it down and it works really nice!!!

    Code:
    		this.uploader = new Ext.ux.FileUploader(config);
    
    		// relay uploader events
    		this.relayEvents(this.uploader, [
    			 'beforeallstart'
    			,'allfinished'
    			,'filefinished' // i think its very helpful
    			,'progress'
    		]);
    
    		// install event handlers
    Maybe you can use it!
    R2D2 aka Stephan Baltzer
    iDEDV - EDV-Entwicklungen Baltzer & Klein (CEO)

  7. #587
    Ext User
    Join Date
    Nov 2007
    Location
    Cologne, Germany
    Posts
    19
    Vote Rating
    0
    iDevelopment is on a distinguished road

      0  

    Default


    And another contribution...

    I couldn't find a way to examine the server responses for each, is there a way? If not, now there may be:

    File: Ext.ux.FileUpload.js

    Code:
    	/**
    	 * called for both success and failure. Does nearly nothing
    	 * @private
    	 * but dispatches processing to processSuccess and processFailure functions
    	 */
    	,uploadCallback:function(options, success, response) {
    
    		var o;
    		this.upCount--;
    		this.form = false;
    
    		
    		// process ajax success
    		if(true === success) {
    			try {
    				o = Ext.decode(response.responseText);
    			}
    			catch(e) {
    				this.processFailure(options, response, this.jsonErrorText);
    				this.fireFinishEvents(options, response.responseText);
    				return;
    			}
    			// process command success
    			if(true === o.success) {
    				this.processSuccess(options, response, o);
    			}
    			// process command failure
    			else {
    				this.processFailure(options, response, o);
    			}
    		}
    		// process ajax failure
    		else {
    			this.processFailure(options, response);
    		}
    
    
    		this.fireFinishEvents(options, response.responseText);
    
    	} // eo function uploadCallback
    and

    Code:
    	/**
    	 * Fires event(s) on upload finish/error
    	 * @private
    	 */
    	,fireFinishEvents:function(options, responseText) {
    		if(true !== this.eventsSuspended && !this.singleUpload) {
    			this.fireEvent('filefinished', this, options && options.record, responseText);
    		}
    		if(true !== this.eventsSuspended && 0 === this.upCount) {
    			this.stopProgress();
    			this.fireEvent('allfinished', this);
    		}
    	} // eo function fireFinishEvents

    You see i added the response.responseText as additional event parameter so i can return more than success:true from the server

    (In our case i need to return the md5'ed filename for convienience ^^)

    So i return a

    {"success":true, "md5":{"myfile.csv":"2d4e9ab69526a036424c2596e4721e4e.csv"}}

    and catch it from the response.responseText as third parameter in event filefinish
    R2D2 aka Stephan Baltzer
    iDEDV - EDV-Entwicklungen Baltzer & Klein (CEO)

  8. #588
    Sencha User
    Join Date
    Feb 2008
    Location
    Illinois
    Posts
    142
    Vote Rating
    0
    carl23934 is on a distinguished road

      0  

    Default


    I have found when trying to debug HTTP with firebug, firebug can be extremely wrong sometimes. I settled on using a simple software proxy. You see the exact request, and the exact response.

    http://www.siliconwold.com/intercept...eptor_home.htm

    Download, start, point firefox to 127.0.0.1:81 for the proxy, and debug!

  9. #589
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    652
    Vote Rating
    0
    Dumbledore is on a distinguished road

      0  

    Default can someone confirm?

    can someone confirm?


    currently i debug my project and found that following in Ext.ux.FileTreePanel.js is never fired in Firefox 3.0.4:

    Code:
    	/**
    	 * requests file download from server
    	 * @private
    	 * @param {String} path Full path including file name but relative to server root path
    	 */
    	,downloadFile:function(path) {
    
    		[...]
    
    		var callback = function() {
    			Ext.EventManager.removeListener(frame, 'load', callback, this);
    			setTimeout(function() {document.body.removeChild(form);}, 100);
    			setTimeout(function() {document.body.removeChild(frame);}, 110);
    		};
    		
    		Ext.EventManager.on(frame, 'load', callback, this);
    
    		form.submit();
    	}
    Can someone confirm this?

  10. #590
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,133
    Vote Rating
    322
    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've tested it while developing and it worked. This is important part as it cleans up hidden frame/form.

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)

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar