首页 > 解决方案 > 使用 curl 将文件上传到表单视图

问题描述

我有一个表单,其中包含一个需要很长时间才能上传的文件,所以我想使用curl填充它我试过这个:

curl -v --progress-bar   -F "contract=M0123456789" \
    -F "email=email@email.com"   -F "target=13.0" \
    -F "aim=test"  -F "dump=@/tmp/db_12.dump"  \
    https://upgrade.odoo.com/upload  

得到这个错误:

< HTTP/1.1 413 Request Entity Too Large
< Server: nginx
< Date: Wed, 04 Aug 2021 08:13:39 GMT
< Content-Type: text/html
< Content-Length: 176
< Connection: close
< 
<html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx</center>
</body>
</html>
* Closing connection 0
* TLSv1.3 (OUT), TLS Unknown, Unknown (21):
* TLSv1.3 (OUT), TLS alert, Client hello (1):

标签: bashformsfilecurlodoo

解决方案


推荐阅读