Win a copy of Functional Reactive Programming this week in the Other Languages 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
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey sorry guys, this is not the right approach.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic