This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum 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
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply 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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Unique File Name when uploading using FormFile
 
Similar Threads
Hiding the full path of the file While Uploading in struts
Upload all the files in the directory to server
Uploading Multiple Files Using html:file
file miss match error in struts 1
How to convert FormFile into BLOB object?