I am looking to upload a multipart/form-data file upload. I working on a circleci job to auto deploy a couple files of a specific file type all in one go.
This solution works but it is making a seperate curl call for each file.
cd ~/project;find . -name "*.txt*" -type f -exec curl -k -H "Accept: application/json" -H "Authorization: Bearer $bearertoken" -F "deployment-name=${CIRCLE_SHA1:0:7}" -F "deployment-source=circleci" -F "enable-duplicate-filtering=false" -F "deploy-changed-only=true" -F "{}=@{}" http:www.blah.com \;
I am wondering if there is a way that I can build a file list of all the files in the directory and then use that variable in a single curl upload.