0

for file in split_ do curl -F 'institutionId=4010' -F 'file=@$file' -F 'userName=testUser' -F 'userRole=admin' -F 'checkerId=R18502' -F 'product=CDL' http://localhost:8080/gonogo/scheme/upload/scheme-status-authorization done;*

check screenshot

I have tried multiple options:- 'file=@${file}' 'file=$file' but nothing is working.

please help me out.

  • Use double quotes. `"file=@$file"` – Charles Duffy Sep 18 '20 at 11:59
  • it is not working this way. thanks – Rahul Mittal Sep 18 '20 at 12:08
  • Use `set -x` to enable trace logging, and compare the curl commands shown in that trace before and after. With the single quotes, you'll see it never passes the filename to curl at all. "Not working" can mean a lot of different things -- I'd suggest turning up the verbosity until you can see the actual request that curl is making. If that request includes your file's contents, the specific problem this question focuses on is solved. – Charles Duffy Sep 18 '20 at 12:14

0 Answers0