This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unique File Name when uploading using FormFile

 
ods gel
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic