windows - Curl for Windows - curl 无法打开文件 C :\test. txt

标签 windows curl path

我正在尝试在 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/

相关文章:

windows - 从 Windows 中的所有子文件夹中删除 CVS 文件夹

c++ - Windows/Linux下直接访问内存设备

php - 如何修复连接超时、cURL 错误 28?

node.js - 关于nodejs推送数据到浏览器开源框架

java - 如何在 Ubuntu 中设置临时 Java 类路径

python - 如何安装ChartDirector?

c++ - 如果路径包含符号链接(symbolic link),Windows API 获取文件属性?

windows - 尝试使用 Install-Module 在 Windows Server 2016 中安装 Docker 时出错

PHP 执行时间超过 max_execution_time... 有时

java - 将 Jar-URI 转换为 nio.Path