This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I need suggestions on the following logic i developed to generate a random string.

 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody, I am Chaitanya, I am now on a web application, I have a situation where the user will be uploading multiple images in single request. If the user gives same names for each and every image all the images will be over ridden. I can use java scripting, but what if java script is disabled? I can go for server side scripting but I don't want to do that because if tries to upload multiple times using the same name again the images will be over ridden.

So what I am thinking is to generate a unique random string and append it at the end of the image name. So I am using the current day, month, year, time in milliseconds and constructing a string then I am appending it.

Is my approach right? Am I in the right direction? Please help me.

Thank you all in advance.
 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey sorry guys, this is not the right approach.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic