Skip to content

Commit fac3da2

Browse files
committed
Update examples/eg010SendBinaryDocs.sh
1 parent 046896b commit fac3da2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/eg010SendBinaryDocs.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ boundary="multipartboundary_multipartboundary"
9191
# it is not easy to printf hyphens. See https://unix.stackexchange.com/q/22764/149244
9292
hyphens_cmd='printf "--" --'
9393

94-
eval hyphens_cmd > $request_data
94+
eval "$hyphens_cmd" > $request_data
9595
printf "${boundary}" >> $request_data
9696
printf "${CRLF}Content-Type: application/json" >> $request_data
9797
printf "${CRLF}Content-Disposition: form-data" >> $request_data
@@ -102,7 +102,7 @@ printf "${CRLF}${json}" >> $request_data
102102
# filename, and documentId. The filename and documentId must match
103103
# the document's info in the JSON.
104104
printf "${CRLF}" >> $request_data
105-
eval hyphens_cmd >> $request_data
105+
eval "$hyphens_cmd" >> $request_data
106106
printf "${boundary}" >> $request_data
107107
printf "${CRLF}Content-Type: text/html" >> $request_data
108108
printf "${CRLF}Content-Disposition: file; filename=\"Order acknowledgement\";documentid=1" >> $request_data
@@ -111,7 +111,7 @@ printf "${CRLF}" >> $request_data
111111
cat "$doc1_path" >> $request_data
112112

113113
printf "${CRLF}" >> $request_data
114-
eval hyphens_cmd >> $request_data
114+
eval "$hyphens_cmd" >> $request_data
115115
printf "${boundary}" >> $request_data
116116
printf "${CRLF}Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document" >> $request_data
117117
printf "${CRLF}Content-Disposition: file; filename=\"Battle Plan\";documentid=2" >> $request_data
@@ -120,7 +120,7 @@ printf "${CRLF}" >> $request_data
120120
cat "$doc2_path" >> $request_data
121121

122122
printf "${CRLF}" >> $request_data
123-
eval hyphens_cmd >> $request_data
123+
eval "$hyphens_cmd" >> $request_data
124124
printf "${boundary}" >> $request_data
125125
printf "${CRLF}Content-Type: application/pdf" >> $request_data
126126
printf "${CRLF}Content-Disposition: file; filename=\"Lorem Ipsum\";documentid=3" >> $request_data
@@ -130,9 +130,9 @@ cat "$doc3_path" >> $request_data
130130

131131
# Add closing boundary
132132
printf "${CRLF}" >> $request_data
133-
eval hyphens_cmd >> $request_data
133+
eval "$hyphens_cmd" >> $request_data
134134
printf "${boundary}" >> $request_data
135-
eval hyphens_cmd >> $request_data
135+
eval "$hyphens_cmd" >> $request_data
136136
printf "${CRLF}" >> $request_data
137137

138138
curl --header "Authorization: Bearer {ACCESS_TOKEN}" \

0 commit comments

Comments
 (0)