Bash mingw32/bin/curl:参数列表太长
我在win7中使用git bash。我在curltest.sh中有以下shell脚本:Bash mingw32/bin/curl:参数列表太长,bash,curl,git-bash,Bash,Curl,Git Bash,我在win7中使用git bash。我在curltest.sh中有以下shell脚本: #!/bin/sh curl -X POST \ 'https://api.ocr.space/parse/image' \ -H "apikey:#####" \ -F "language=eng" \ -F "isOverlayRequired=false" \ -F "iscreatesearchablepdf=false" \ -F "issearchablepdfhidet
#!/bin/sh
curl -X POST \
'https://api.ocr.space/parse/image' \
-H "apikey:#####" \
-F "language=eng" \
-F "isOverlayRequired=false" \
-F "iscreatesearchablepdf=false" \
-F "issearchablepdfhidetextlayer=false" \
-F "base64Image=data:application/pdf;base64,JVBERi0xLjMKMSAwIG9iago8PAovVHlwZSAvUGFnZXMKL0NvdW50IDEKL0tpZHMgWy......
当我运行此命令时:
$ sh curltest.sh
curltest.sh: line 3: /mingw32/bin/curl: Argument list too long
我怎样才能让它工作
PS-检查您是否尝试使用配置文件 -K、 --配置
指定从哪个配置文件读取curl参数。配置文件是
可以编写哪些命令行参数,然后将使用哪些命令行参数,就像编写这些参数一样
在实际的命令行上 或者,如果它只是一个太大的-F选项,您可以将其放入文件中,从
man
:
To force the 'content' part to be a file, prefix the file name with an @ sign.
base64数据有多大?这是一个完整的pdf文件,所以我认为它的大小约为>100KB