1. #31
    Ext User
    Join Date
    Mar 2008
    Posts
    4
    Vote Rating
    0
    fallenone is on a distinguished road

      0  

    Default this is great!

    this is great!


    I just want to say this a grey plugin! And is going to work perfectly for a project I'm doing! And I just have a couple questions. How do u populate the tree I see its calling a Php file but what does the code look like. I tried searching around Gor it but couldn't find anything. An example would be great also I was wondering how extensible this was ie. File types and what not.like for images leave it as open on new browser window bit if its something else then open a new tab? I'm new to Ext so I'm trying to figure stuff out and haven't had a chance to fully look at your code. Any help would be much appreciated!

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


    Re PHP - this is client side forum so I haven't included PHP files on purpose. PHP is only one of the server languages that can be used for this purpose. I have publishe Client/Server Communication Specification instead that you can use to write your server backend.

    Filetypes icons used are defined in css file that you can change to your liking.

    Also, you have 4 open modes one of them you can set as default.

    The full source code is included in download just open it in your favorite editor. Also, the source code is fully documented with description of configuration variables and is heavily commented. You're welcome to read it.
    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. #33
    Ext User
    Join Date
    Mar 2007
    Posts
    94
    Vote Rating
    0
    danvega is on a distinguished road

      0  

    Default ColdFusion Backend

    ColdFusion Backend


    First off thanks for all your help. I got everything working so If anyone needs it here is my filetree.cfm page.

    Code:
    <cfswitch expression="#form.cmd#">
    
    	<cfcase value="get">
    		<cfdirectory action="list" directory="#ExpandPath('.')#\#form.path#" name="directoryListing">	
    		[<cfoutput query="directoryListing">{text:"#name#",disable:false,leaf:<cfif type EQ "Dir">false<cfelse>true</cfif>}<cfif currentRow NEQ recordCount>,</cfif></cfoutput>]
    	</cfcase>
    
    	<cfcase value="delete">
    		<cftry>
    			<cffile action="delete" file="#ExpandPath('.')#\#form.file#">
    			{"success":true}
    			<cfabort>
    			<cfcatch type="any">
    			<cfoutput>{"success":false,"error":"#cfcatch.message#"}</cfoutput>
    			</cfcatch>
    		</cftry>
    	</cfcase>
    
    	<cfcase value="rename">		
    		<cftry>
    			<cffile action="rename" source="#ExpandPath('.')#\#form.oldname#" destination="#ExpandPath('.')#\#form.oldname#">
    			{"success":true}
    			<cfabort>
    			<cfcatch type="any">
    				<cfoutput>{"success":false,"error":"Cannot rename file #form.oldname# to #form.newname#"}</cfoutput>
    			</cfcatch>
    		</cftry>
    	</cfcase>
    
    	<cfcase value="newdir">
    		<cftry>
    			<cfdirectory action="create" directory="#ExpandPath('.')#\#form.dir#">
    			{"success":true}
    			<cfabort>
    			<cfcatch type="any">
    				<cfoutput>{"success":false,"error":"Cannot create directory: #form.dir#"}</cfoutput>
    			</cfcatch>
    		</cftry>
    	</cfcase>
    
    	<cfcase value="upload">
    		<cfset pos = listContains(form.fieldnames,"EXT")>
    		<cfset input = listGetAt(form.fieldnames,pos)>
    		<cftry>
    			<cffile action="upload" destination="#ExpandPath('.')#\#form.path#\" filefield="form.#input#">
    			{"success":true}	
    			<cfabort>
    		<cfcatch type="any">
    			<cfoutput>{"success":false,"errors":{"#input#":"#cfcatch.message#"}}</cfoutput>
    		</cfcatch>
    		</cftry>
    	</cfcase>
    
    </cfswitch>

  4. #34
    Ext User
    Join Date
    Mar 2007
    Posts
    94
    Vote Rating
    0
    danvega is on a distinguished road

      0  

    Default Icons

    Icons


    Also something I noticed. When I first load the page the icons for images are the generic leaf icon. If I go and rename them but keep the same extension it turns to the correct image icon. Maybe i have something wrong on my end but I thought I would throw it out there.

    Again, great work...

  5. #35
    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'd bet it something at your site as I cannot observe this behavior on demo page.
    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. #36
    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 know nothing about cfm but I don't see there any part that would make paths safe. Some intruder can throw path like "../../../../../" or "/ etc / passwd" to your script.
    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


  7. #37
    Sencha User madrabaz's Avatar
    Join Date
    May 2007
    Location
    Turkey
    Posts
    125
    Vote Rating
    0
    madrabaz is on a distinguished road

      0  

    Default


    Hi saki,
    thanks for this greeat extension,
    I think I found some issues;
    • When move the file (actualy rename) folders do not refresh. I mean if I move file x from folder A to folder B, After the rename(move) operation file x seen booth folder A and B
    • When file upload Ext.ux.FileUploader class sends unnecessary 'dir' parameter
      Ext.ux.FileUploader line 79
      Code:
      	 baseParams:{cmd:'upload',dir:'.'}
    And a question
    when we use _POST['UPLOAD_IDENTIFIER'] parameter (upload progress?)

    regards,

  8. #38
    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 pointing out the "double file" issue, I'll take a look at it.

    dir parameter is very important as it says where to upload. Without it you could upload only to the tree root and then you would need to move uploaded file(s) manually. Now, if you open context menu on, let's say, Folder A and then upload, dir is set to "./Folder A" and file is uploaded directly there.

    UPLOAD_IDENTIFIER, yes, it's for upload progress. You can safely ignore it serverside if you don't need/want upload progress.
    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


  9. #39
    Sencha User madrabaz's Avatar
    Join Date
    May 2007
    Location
    Turkey
    Posts
    125
    Vote Rating
    0
    madrabaz is on a distinguished road

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    dir parameter is very important as it says where to upload. Without it you could upload only to the tree root and then you would need to move uploaded file(s) manually. Now, if you open context menu on, let's say, Folder A and then upload, dir is set to "./Folder A" and file is uploaded directly there.
    But FileTreePanel also sends 'path' which show exact upload directory.
    Code:
    Array
    (
        [UPLOAD_IDENTIFIER] => 6362778439
        [MAX_FILE_SIZE] => 524288
        [path] => images/pages/3
        [cmd] => upload
        [dir] => .
    )

  10. #40
    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


    FileTreePanel doesn't send anything. All client/server communication is done by FileUploader.

    Do you have any problem these posted values? Do they conflict with your application? Does it somehow breaks your application? Any recommended patch?
    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


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)