Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,

I am uploading files using MVC3 all things are working fine.

I am using <input type="file"> control

The problem is arising that if I upload a file name "abc.gif" and next time I upload the same file, then instead of overwriting it is showing exception msg Access is denied to Uploads.

Uploads is the directory where I am placing my files.

Kindly tell me how can i handle this.

Regards
Posted
Updated 19-Dec-11 3:29am
v2
Comments
Muralikrishna8811 19-Dec-11 7:31am    
Hi upto my knowledge u've to get all access of that folder from your server admin

The problem is that you do not have access to overwrite the same file. To handle this you should move the file to another location after the upload. Before you move, you check if there is a file with the same name. If there is another file with the same name, you need to decide what you want to do.
 
Share this answer
 
 
Share this answer
 
v2
Comments
RaviRanjanKr 20-Dec-11 5:27am    
Nice Link, My 5+
Monjurul Habib 20-Dec-11 11:35am    
thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900