I have a bash script that loops through all files in a directory and makes a curl request to some URL
for FILE in ./files/*;
do
echo "Making a request..."
echo $FILE
curl --location --request POST "${URL}" \
--form 'file=@"${FILE}"' \
sleep 100
done
echo "done!"
The curl request was copied from postman so I'm confident that it works.
When I run the script, I get the following
Making a request...
./files/split1.csv
curl: (26) Failed to open/read local data from file/application
The issue I'm getting is how to handle string interpolation here.