Start using database

Now can upload file to database
Add duplication check