fixed example for upload function