ASP.NET File Upload

  • Thread starter Thread starter Tuan
  • Start date Start date
T

Tuan

Hi,
I already have a function upload file into a folder in
asp.net and it is working. However, I want to alert or
warning users if they upload a file that have the same
name or it is already exist in the folder. Does anyone
know how to do it or give me some ideas?
Thanks in advance
Tuan
 
Store the file on disk as a random file name (like GUID.txt etc).
Then, see if a file exists with the name they tried to call it.
If it exists, prompt the user for the new file name or ask them to
overwrite. When they tell you what they want, you can do a rename on the
GUID.txt file.

Does that make sense? Let me know if you need more details.

Michael
 

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