how to overcome the overwriting of uploaded file
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Krishna_Kumar
Posted On:   Monday, August 20, 2001 10:45 PM

Hi!Iam using com.oreilly.servlet.MultipartRequest up = new com.oreilly.servlet.MultipartRequest(request,"c:/test",10*1024); to upload a file into server.Can anyone help me in solving the prevention of overwriting of existing uploaded file? For example if i upload "paint.bmp",then this will be stored as "paint.bmp" in the server. Again if i upload a different picture under the same file name "paint.bmp" , the previous one is overwritten by the new one.This shouldnt happen.If the file "paint.bmp" already exists, some new filename should be generated for the new uploaded file and saved.can any one pass me source code for this problem.Thank you in advance....    More>>

Hi!Iam using
com.oreilly.servlet.MultipartRequest up = new com.oreilly.servlet.MultipartRequest(request,"c:/test",10*1024);


to upload a file into server.Can anyone help me in solving the prevention of overwriting of existing uploaded file?
For example if i upload "paint.bmp",then this will be stored as "paint.bmp" in the server.
Again if i upload a different picture under the same file name "paint.bmp" , the previous one is overwritten by the new one.This shouldnt happen.If the file "paint.bmp" already exists, some new filename should be generated for the new uploaded file and saved.can any one pass me source code for this problem.Thank you in advance....

   <<Less
About | Sitemap | Contact