Implemented upload which uploads photo to uploads dir and saves photo data to the database.