File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Unique File Name when uploading using FormFile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Unique File Name when uploading using FormFile" Watch "Unique File Name when uploading using FormFile" New topic
Author

Unique File Name when uploading using FormFile

ods gel
Greenhorn

Joined: Oct 09, 2007
Posts: 8
Hi,
I m uploading a file using with FormFile (Struts).
What is the best way to save it with unique name for each file (so it won't overwrite exiting ones)?
Chris Boldon
Ranch Hand

Joined: Aug 10, 2006
Posts: 190
I prefer to save then as BLOBs in a database. However, if you're going to store them on the file system I'd use a timestamp.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unique File Name when uploading using FormFile