我正在尝试在 Windows 设备上使用 CURL,但无法计算出在特定位置上传文件的正确语法,希望有人能给我个主意。
目前我正在尝试的语法如下;
curl --proxy-ntlm --proxy-user domain\username:password --proxy proxy.server:80 -vk 'filename=hello.txt' -F 'file=@C:\hello.txt' https://upload.site
但我得到的只是curl: (26) couldn't open file "C:\hello.txt"
我尝试了@C:\\hello.txt、@C:/hello.txt、@"C:\hello.txt",但仍然出现同样的错误。
有没有人知道我可能哪里出错了?我不敢相信它会像我想象的那么难:-)
最佳答案
在 Window 7 上,我遇到了同样的问题。 我只是将 ' 固定为 "
例如:
curl --proxy-ntlm --proxy-user domain\username:password --proxy proxy.server:80 -vk "filename=hello.txt" -F "file=@C:\hello.txt" https://upload.site
关于windows - Curl for Windows - curl 无法打开文件 C :\test. txt,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34750446/