bash - 使用 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):
解决方案
推荐阅读
- php - 如何使用带有多个输入文件的 PHP“SWITCH”功能从 HTML 表单上传多个文件?
- django - 具有多个数据库 Mongodb 和 Neo4j 的 Django
- netsuite - 在 Netsuite ITEM 保存的搜索中显示最后销售日期
- python - 按数据框中的列分组,但将其中一些组汇总为一组
- parsing - .NET 语言,用于最干净地实现 ISO 8583 解析器
- javascript - div内的复选框更改正在调用父单击方法。最初如何限制它访问父方法?
- api - 如何从 PowerBuilder 应用程序播放哔声?
- javascript - 纯 Javascript 填充数据以从 JSON URL 中选择选项
- php - 如何在 PHP 中使用正则表达式解析输入文本
- javascript - 为什么我的标头没有使用 beforSend 方法设置?