1. #611
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    From a security point of view wouldn't be better if the server returned an 'alias' in the first place?

  2. #612
    Sencha User vmorale4's Avatar
    Join Date
    Mar 2007
    Location
    Chicago, IL
    Posts
    189
    Vote Rating
    1
    vmorale4 is on a distinguished road

      0  

    Default


    Quote Originally Posted by mjlecomte View Post
    From a security point of view wouldn't be better if the server returned an 'alias' in the first place?

    Yes that might be true but then determining the 'real' path becomes significantly more complex when you are using an alternate name for every subdirectory because the server would need to map-back every directory traversed in the 'virtual path' to determine the real location.

    Instead I'm using a mixed approach. The root directory name for the application is 'fake', but every directory under it isn't.

    So the URL to download a file would look something like this in my app:

    PHP Code:
    http//myserver.com/FileSharing/viewFile.ashx?path=root/0945340/presentation.ppt 
    viewFile.ashx only needs to 'map back' the root directory (which is an application setting pointing to C:\mystorage)

    The real location of presentation.ppt in this case is c:\mystorage\0945340\presentation.ppt

  3. #613
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,527
    Vote Rating
    379
    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


    Hmmm, I'm not sure if I'm ever going the "alias" direction. I think it's space for further extensions of users.
    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


  4. #614
    Sencha User vmorale4's Avatar
    Join Date
    Mar 2007
    Location
    Chicago, IL
    Posts
    189
    Vote Rating
    1
    vmorale4 is on a distinguished road

      0  

    Default


    Quote Originally Posted by rtrocc View Post
    I hate to barge in an existing support conversation, but I was just curious if anyone has noticed the following issue in FF3 (could happen in other browsers too) :

    After a file is uploaded via the UploadPanel , you will see the browser remain in a "transferring data" status. Im assuming the connection is not closed properly or is stuck in a loop somewhere.

    I would try to pinpoint this myself but I am trying to meet a deadline with a project and I need to get other sections done atm.

    Your help is always appreciated
    Quote Originally Posted by jsakalos View Post
    Does it happen only with UploadPanel or also with standard Ext upload?

    I noticed this as well.

    AFAIK it only happens with your UploadPanel, the standard Ext upload component doesn't exhibit this problem (at least in the example):

    http://extjs.com/deploy/dev/examples...le-upload.html

  5. #615
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,527
    Vote Rating
    379
    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 have just tried to upload a file (a short one) to http://filetree.extjs.eu with FF-3.0.5@Linux and it works flawlessly. Does your server return a correct response?
    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. #616
    Sencha User vmorale4's Avatar
    Join Date
    Mar 2007
    Location
    Chicago, IL
    Posts
    189
    Vote Rating
    1
    vmorale4 is on a distinguished road

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    I have just tried to upload a file (a short one) to http://filetree.extjs.eu with FF-3.0.5@Linux and it works flawlessly. Does your server return a correct response?
    Hmm, interesting... It must be something related to the Windows port of Firefox only... I also just uploaded a small file (yserver.txt) to filetree.extjs.eu and I still get the 'Transfering data' message (FF-3.0.5@Windows XP)


    The next step I'll take is compare the response headers when posting a file to your server vs posting a file in the Ext Upload component example
    Attached Images

  7. #617
    Ext User
    Join Date
    Feb 2008
    Posts
    275
    Vote Rating
    0
    Rafael is on a distinguished road

      0  

    Default


    When i Load the file have a mesage error: Cannot decode Jsob object

    upload.html
    Code:
    <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <link rel="stylesheet" type="text/css" href="../css/ext-all.css">
      <link rel="stylesheet" type="text/css" href="upload/css/icons.css">
      <link rel="stylesheet" type="text/css" href="upload/css/webpage.css">
      <link rel="stylesheet" type="text/css" href="upload/css/filetree.css">
      <link rel="stylesheet" type="text/css" href="upload/css/filetype.css">
      <link rel="stylesheet" type="text/css" href="upload/css/famflag.css">
      <link rel="stylesheet" type="text/css" href="upload/css/Ext.ux.IconCombo.css">
      <link rel="stylesheet" type="text/css" href="upload/css/empty.css" id="theme">
    
      <script type="text/javascript" src="js/ext-base.js"></script>
      <script type="text/javascript" src="js/ext-all-debug.js"></script>
      <script type="text/javascript" src="upload/js/WebPage.js"></script>
      <script type="text/javascript" src="upload/js/Ext.ux.form.BrowseButton.js"></script>
      <script type="text/javascript" src="upload/js/Ext.ux.FileUploader.js"></script>
      <script type="text/javascript" src="upload/js/Ext.ux.UploadPanel.js"></script>
      <script type="text/javascript" src="upload/js/Ext.ux.FileTreeMenu.js"></script>
      <script type="text/javascript" src="upload/js/Ext.ux.FileTreePanel.js"></script>
      <script type="text/javascript" src="upload/js/Ext.ux.ThemeCombo.js"></script>
      <script type="text/javascript" src="upload/js/Ext.ux.IconCombo.js"></script>
      <script type="text/javascript" src="upload/js/Ext.ux.LangSelectCombo.js"></script>
      <script type="text/javascript" src="upload/js/filetree.js"></script>
      <title id="page-title">Gerar Boletos em PDF</title>
    </head>
    
    <body>
        <div id="west-content" class="x-hidden">
        
        </div>
        <div id="center-content" class="x-hidden">
        
        </div>
    </body>
    </html>
    and my upalod.php
    Code:
    <?php
    if( $_FILES ) {
    
        require_once("../pdf/dompdf_config.inc.php");
        $fp = fopen( $_FILES[file][tmp_name] ."/". $_FILES[file][name], "r");
        while (!feof($fp)){
            $old_limit = ini_set("memory_limit", "16M");
            $dompdf = new DOMPDF();
            $dompdf->load_html(fgetc($fp));
            $dompdf->set_paper("a10", "portrait");
            $dompdf->render();
            $dompdf->stream("dompdf_out.pdf");
            exit(0);
        }
        
        fclose($fp);
        echo {"success":true};
    
    }
    ?>

  8. #618
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,527
    Vote Rating
    379
    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


    Server returns an invalid response, a json (text?) that cannot be decoded.
    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. #619
    Sencha User vmorale4's Avatar
    Join Date
    Mar 2007
    Location
    Chicago, IL
    Posts
    189
    Vote Rating
    1
    vmorale4 is on a distinguished road

      0  

    Default


    Quote Originally Posted by Rafael View Post
    When i Load the file have a mesage error: Cannot decode Jsob object
    Quote Originally Posted by jsakalos View Post
    Server returns an invalid response, a json (text?) that cannot be decoded.
    @Rafael: Are you using IE? I too found this issue today (works fine in Firefox).

    With a little help from Fiddler tool, I found out that the request sent by IE differs from the request send by Firefox, in particular the filename sent by IE is an absolute path.

    Firefox:
    -----------------------------27350115016941
    Content-Disposition: form-data; name="ext-gen144"; filename="readers.txt"
    Content-Type: text/plain


    IE:
    -----------------------------7d813714a07f2
    Content-Disposition: form-data; name="ext-gen106"; filename="C:\temp\readers.txt"
    Content-Type: text/plain



    My guess right now is that Ext.Ux.FileUploader l is not correctly stripping the path stuff in IE (haven't finish debugging the code yet)

    As workaround you can change your server code to strip any text before the last index of '\'

    I'll post a follow-up post later with a patch to Ext.ux.FileUploader
    Last edited by vmorale4; 22 Dec 2008 at 9:52 AM. Reason: Corrected filename that I'm debugging

  10. #620
    Sencha User vmorale4's Avatar
    Join Date
    Mar 2007
    Location
    Chicago, IL
    Posts
    189
    Vote Rating
    1
    vmorale4 is on a distinguished road

      0  

    Default


    OK I found out that IE *ALWAYS* sends the entire file path when sending form upload requests, so unfortunately there's no client-side workaround. You have to parse the filename server-side.


    http://www.velocityreviews.com/forum...ath-in-ie.html

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)