artifactory-client-java icon indicating copy to clipboard operation
artifactory-client-java copied to clipboard

Question: How to download artifacts with blank spaces on the url?

Open ricardf opened this issue 5 years ago • 1 comments

I'm trying to use the artifactory.repository("RepoName") .download("path/to/fileToDownload.txt") .doDownload();

but the path on the download() contains blank spaces and is failing. I tried to encode it but it seems to fail. Is there any solution tot that?

thank

ricardf avatar Aug 14 '19 08:08 ricardf

Under the hood, the path of the artifact is turned into the path segment of the URL used to get the artifact. Because of this, spaces have to be encoded to %20 .

Example to get path/to/file with spaces.txt:

artifactory.repository("RepoName")
  .download("path/to/file%20with%20spaces.txt")
  .doDownload();

The same applies for uploading artifacts.

dodie avatar Oct 23 '19 21:10 dodie