wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
Similar Threads
Uploading Multiple Files Using html:file
Upload all the files in the directory to server
file miss match error in struts 1
How to convert FormFile into BLOB object?
Hiding the full path of the file While Uploading in struts