test upload function