commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r409327 - /jakarta/commons/proper/fileupload/trunk/xdocs/faq.fml
Date Thu, 25 May 2006 08:02:21 GMT
Author: bayard
Date: Thu May 25 01:02:21 2006
New Revision: 409327

URL: http://svn.apache.org/viewvc?rev=409327&view=rev
Log:
Added a faq entry concerning the IE/other-browser difference in FileItem.getName

Modified:
    jakarta/commons/proper/fileupload/trunk/xdocs/faq.fml

Modified: jakarta/commons/proper/fileupload/trunk/xdocs/faq.fml
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/fileupload/trunk/xdocs/faq.fml?rev=409327&r1=409326&r2=409327&view=diff
==============================================================================
--- jakarta/commons/proper/fileupload/trunk/xdocs/faq.fml (original)
+++ jakarta/commons/proper/fileupload/trunk/xdocs/faq.fml Thu May 25 01:02:21 2006
@@ -58,6 +58,23 @@
 		web application, instead of relying on the container.
 	  </answer>
 	</faq>
+
+        <faq id="whole-path-from-IE">
+          <question>
+            FileItem.getName() returns the whole path. 
+          </question>
+          <answer>
+            Internet Explorer returns the entire path to the uploaded file and 
+            not just the expected filename. Currently, FileUpload does not attempt 
+            to hide this from the user and so a work-around is required: 
+            <pre>
+    String fileName = item.getName();
+    if(fileName != null) {
+      fileName = new java.io.File(fileName).getName();
+    }
+            </pre>
+          </answer>
+        </faq>
   </part>
 
   <part id="struts">



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message