CLOSE input stream after upload

Close the input stream after upload. Otherwise, jenkins will has problem to delete the upload files or others after it.