upload documents and database