curl - 如何正确设置 curl 上传目标?
问题描述
- task: cURLUploader@2
inputs:
files: 'windows.zip'
url: 'https://transfer.sh/cth-windows-$(Build.SourceVersion).zip'
authtype: userAndPass
这应该设置上传路径,但 DevOps 运行此命令及其输出。它添加upload/44/
到地址。我该如何避免这种情况?
[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
解决方案
因为您没有指定remotePath
他采用默认值 -upload/$(Build.BuildId)
并将其附加到 URL(我认为不应该采用默认值,也许这是一个错误)。
所以只需添加一个空值:
remotePath:
推荐阅读
- javascript - 在向上箭头单击输入类型 =“数字”时显示值为最大值的通知
- python - (Python)Object dict 副本被无故修改
- java - 将 Entity 对象自动转换为 changeSet
- arrays - 获取数组的十六进制值
- mysql - 试图将 Symfony 链接到 mySQL
- integromat - 如何将文件从我的计算机上传到 Integromat 场景?
- pandas - 通过 df.iloc 中的可调用函数每第 n 列获取一段 excel 数据
- python - sklearn RandomForestRegressor 显示的树值中的差异
- azure - Azure devops 在一段时间内更改了工作项列表
- java - 如何更改代码并使用 stream() 代替函数式编程?