Click here to Skip to main content
16,016,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I like to upload an file in my project. when I click the upload button the file should be stored in client system and the file name and path should be stored in the database. When I clicking the download button it should be downloaded based on the file name and path that I have stored in the database. After making the changes it should be uploaded as different file name and it will not affect the previous file content. If there is any code for this process please send it to me.


Thanks in advance
Posted

Start here[^].
 
Share this answer
 
You can follow the below steps:
1.Upload button click means your code will read the file from the client provided path and will save the file in your mentioned path.
2.When you are reading the file that time you can store the client path in db.
3.When some body will down load the file then they should provide some path where your code will write the file.

For code sample you can check this.

I have one doubt in db what will be the primary key for storing the path and file names?
Is it file name?
My concern is File name may not be unique.

Hope this will help you.
 
Share this answer
 
Comments
Member 7946563 8-Jul-11 6:16am    
Not only file name I am generating some code and saving it along with the file name.
Sugato Pal 8-Jul-11 6:39am    
Dont forget to check ->http://www.csharp-examples.net/examples/- .
It really helps me a lot.Hope you will find the same here.

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