fmisa / gwtupload

Automatically exported from code.google.com/p/gwtupload
Other
0 stars 0 forks source link

IE7, in addOnFinishUploadHandler, uploader.getServerInfo().name returns the whole local path of the uploaded file #152

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install ie7
2. upload a file
3. use addOnFinishUploadHandler to know when an uload has finished
4. the uploader.getServerInfo().name returns the whole file path on the local 
system not only the file name

What is the expected output? What do you see instead?
I see the full path, but expect only the file name

What version of the product are you using? On what operating system?
IE7 & XP

Please provide any additional information below.

I use locally 
int idx = info.name.lastIndexOf("\\");
info.name.substring(idx + 1); 
to get the file name.

Original issue reported on code.google.com by tort...@gmail.com on 19 Jun 2012 at 4:46

GoogleCodeExporter commented 8 years ago
The name of the filename is given by the browser implementation, we dont want 
to modify this behavior since we should consider all cases: OS to know which is 
the file separator, Browser version/releaase to know whether it is adding an 
extra path, etc.

As well, it could be cases where the developer wants to know the real name of 
the file name returned by the browser without being truncated (to cache it, dom 
searches etc).

So, since it is easy for the developer to remove the path part in app code we 
prefer you continue doing in this way.

Thanks for reporting
- Manolo

Original comment by manuel.carrasco.m on 3 Dec 2012 at 7:37