Open qlan2 opened 6 years ago
I'm using the upload method which takes the targetPath as string and the content as File object. After calling doUpload() the file can't be deleted. It seems nobody is closing the input stream.
I've just run into this issue as well... I solved it in my own code by passing my own InputStream rather than a File to the UploadableArtifact constructor... but really this should be done properly in this package.
Thanks for sharing this @valenvb! Would you like to contribute the fix through a pull request?
We use doUpload() to upload artifacts to Artifactory, but when we want to delete those artifacts, they can't be deleted since they have not been closed.
https://github.com/jfrog/artifactory-client-java/blob/master/services/src/main/groovy/org/jfrog/artifactory/client/impl/UploadableArtifactImpl.groovy#L78
I think we need to invoke close() on content after uploaded.