tobylane
tobylane

Reputation: 178

How to correctly set the curl upload target?

- task: cURLUploader@2
    inputs:
      files: 'windows.zip'
      url: 'https://transfer.sh/cth-windows-$(Build.SourceVersion).zip'
      authtype: userAndPass

This is supposed to set the upload path, but instead DevOps runs this command and its output. It added upload/44/ to the address. How do I avoid this?

    [command]"C:\Program Files\Git\mingw64\bin\curl.exe" -T d:\a\1\s\windows.zip https://transfer.sh/cth-windows-c4f3511bf195972d0dbc52e4c35ef69f3acd55ed.zipupload/44/ --stderr -  
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Not Found

  6   148  100    10    0     0     23      0 --:--:-- --:--:-- --:--:--    23Not Found

  6   148  100    10    0     0     23      0 --:--:-- --:--:-- --:--:--    23

##[warning]Not all files were uploaded; Uploaded: 0; Total: 1

Upvotes: 3

Views: 972

Answers (1)

Shayki Abramczyk
Shayki Abramczyk

Reputation: 41555

Because you didn't specified the remotePath he takes the default - upload/$(Build.BuildId) and appends it to the URL (I think is not should take the default, maybe it's a bug).

So just add this with an empty value:

remotePath:

Upvotes: 3

Related Questions