Modified clinent-side JS code, JSON with metadata to be stored into DB.