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.