How to replace csv media file or delete existing media file using kobo v2 API

@uchechinedu01, would you mind sharing the entire scripts (that worked well at your end) so that our community should also benefit from the same?