Refactor and add test upload video file