PDA

View Full Version : get filename of input file


shoa
Aug 8th, 2006, 01:30 AM
Hello
I want to select a file in local computer using the tag bellow:

<input type="file" id="file" name="file"/>


By using this way I can select a file. Could you please tell me how I can get the file name (or path) of this file

Many thanks

katentim
Aug 8th, 2006, 02:51 AM
If you're after the file name on the client's machine, try MultipartFile.getOriginalFilename (http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/web/multipart/MultipartFile.html#getOriginalFilename%28%29)()