執行curl上傳檔案
curl --location --request POST 'http://192.168.65.220:19999/upfile/' \
--form '=@"/C:/Users/Administrator/Downloads/hemleen-lua-resty-shell-master.zip"'
報錯option --form: is badly used here
Warning: Illegally formatted input field!
curl: option --form: is badly used here
curl: try 'curl --help' or 'curl --manual' for more information
原因 curl 版本太低不支援 --form參數
把 –form 參數改為 -F 就可以 了
修改後執行
curl --location --request POST http://192.168.65.220:19999/upfile/ -F [email protected]
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
68 8602k 0 0 68 5904k 0 11.6M --:--:-- --:--:-- --:--:-- 11.6M
100 8602k 0 13 100 8602k 16 10.9M --:--:-- --:--:-- --:--:-- 10.9M
save file ok
CSDN_碼404:curl報錯 curl: option --form: is badly used here