commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristine Weissbarth <kristine.weissba...@sourcepark.de>
Subject checking the ending for the output
Date Mon, 14 Jul 2003 09:24:33 GMT
hi,

I'm using commons-fileUpload to upload several files onto a server. But
now he following problem occurs: when writing the file to a specified
location a path has to be specified: File uploadedFile = new File(String
path). When I'm specifying the path without a concrete file name
("/home/user/output" instead of "/home/user/output/output.txt") an
exception is thrown. 
But in my application various files should be uploaded ( e.g. *.txt,
*.pdf ...) though I cannot define explicitly the path with a file as the
endings are different. I guess I have to find out which file ending the
uploaded file has (with item.getName() or something) and then specifying
the output ending dynamically. Any idea how that can be done?

Thanks.


Mime
View raw message