gpt4 book ai didi

windows - Windows 中的 curl 读取函数返回了有趣的值

转载 作者:行者123 更新时间:2023-12-02 04:23:43 34 4
gpt4 key购买 nike

我正在使用以下命令将文件上传到端点

curl -X POST -H "authorization: Basic base64encode" -H "Content-Type: 
multipart/form-data" -H "X-Atlassian-Token: nocheck" -F
"file=@c:/Users/User/Desktop/testresults.xml" https://jira.test-
server.ag/rest/api/latest/issue/man-287/attachments

mac下的命令没有问题,在windows下我变成了以下错误
curl: (26) read function returned funny value

curl 版本
curl 7.64.0 (x86_64-w64-mingw32) libcurl/7.64.0 OpenSSL/1.1.1a 

使用 https://chocolatey.org 安装

最佳答案

我在使用 curl 时遇到了同样的问题在 Windows 10 上的 Linux 的 Windows 子系统上。我不得不将路径从 C:\Temp\File.txt 更改为至 /mnt/c/Temp/File.txt .

检查您是否可以在 shell 中访问该文件,例如与 dir c:\path\to\file.txt如果它失败了,那么你知道你必须先修复路径。

关于windows - Windows 中的 curl 读取函数返回了有趣的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56930922/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com