When i get the filename of the uploaded file i receive something like this: c:\MyPath\Dev\test_file.csv.
Interesting is that in Chrome this problem is handled and i can get the real file name test_file.csv.
Because i find this that is a real problem (http://dev.vaadin.com/ticket/3817) i decide in december to resolve it.
So lets see my solution:
Probably you are use the some Upload Receiver that implement the Receiver class.
private static class UploadReceiver implements Receiver
... declarations... codes ....
public OutputStream receiveUpload (String filename, String MIMEType)
myUploadedFilename = this.ParseFileName(filename);
private String ParseFileName (String filename)
String MyFileName = "";
//searching the last position of path delimiter
int lastPathDivider = filename.lastIndexOf ("\\");
//get the last substring of filename string
MyFileName = filename.substring (lastPathDivider + 1);
So the solution give by Vaadin in 6.2 have some troubles (you finded? try it). With this i eliminate every problems with parsing the file name and the incorrect string structure.