File IO question with a web application

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Hi I have a web application that uploads files to the server which is
working. A minor issue is that if the file already exists I get the error
file.doc already exists.
Just wondering if there is a way to have it automatically replace the file
and not produce the error?
thanks.
 
hi,

first check if the file already exists or not...
if exists give the user option to choose between replace or not...
if user chooses replace delete the previous file and then upload the
file...

best of luck


Munna
 
Hi, thanks for the response. I will give it a try. I think the method you
have described will work well for my application as in some cases the file
path is just a path to a directory or a URL, so in those cases there are no
files to delete.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top