If that is the case then you need a bog standard upload script, accept from in the success block of code you will need to run some queries that will store the name of the file in the database along with any other information about the file you may need.
As for retrieving the file you just need to use a get to pass the ID of the file and then run a query using the GET variable and the n display all information about the file and passably a download link.