aspose file tools*
The moose likes Java in General and the fly likes I need suggestions on the following logic i developed to generate a random string. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "I need suggestions on the following logic i developed to generate a random string." Watch "I need suggestions on the following logic i developed to generate a random string." New topic
Author

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

chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 800

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.


Love all, trust a few, do wrong to none.
chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 800

Hey sorry guys, this is not the right approach.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I need suggestions on the following logic i developed to generate a random string.
 
Similar Threads
Please help me with CAPTCHA
should I be using ajax or just generate with javascript?
get image from https url
Image ath for JButtons using NetBeans
how can i display an image on browser