working upload into db