Akash Tripathi
Akash Tripathi

Reputation: 57

Uploading images to a specific folder on disk using JSP

hey guys please refer to this post.....Uploading Images Using JSP/Servlets

my question is if we upload a same image multiple times, how will be the image stored...? for example, if one uploads an image ABC.jpg, and the other user also uploads the image with the same name, how will the system accept it, coz normally in any OS when we try to add a file with the same name, it either asks to "REPLACE" OR "RENAME" the file.

so how to use this concept...?? thanks

Upvotes: 0

Views: 988

Answers (1)

Laabidi Raissi
Laabidi Raissi

Reputation: 3333

In my projects, I always change the name of file uploaded, and add to it the time of upload in millis. This being, there is really a very little chance that two users upload the same file at the very same moment.

Upvotes: 1

Related Questions