Added upload functionality for database