Adding media upload functionality