This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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
 
jQuery in Action, 3rd edition