Skip to content

Commit c1c069e

Browse files
committed
fix: ruby create deployment
1 parent c92942d commit c1c069e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

templates/ruby/lib/container/client.rb.twig

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ module {{ spec.title | caseUcfirst }}
213213
when 'application/json'
214214
payload = params.to_json
215215
when 'multipart/form-data'
216-
payload = "--#{@boundary}\r\n" + encode_form_data(params)
216+
payload = encode_form_data(params) + "--#{@boundary}--"
217217
headers[:'content-type'] = "multipart/form-data; boundary=#{@boundary}"
218218
else
219219
payload = encode(params)
@@ -284,14 +284,15 @@ module {{ spec.title | caseUcfirst }}
284284
else
285285
post_body = []
286286
if value.instance_of? InputFile
287+
post_body << "--#{@boundary}\r\n"
287288
post_body << "Content-Disposition: form-data; name=\"#{key}\"; filename=\"#{value.filename}\"\r\n"
288289
post_body << "Content-Type: #{value.mime_type}\r\n\r\n"
289290
post_body << value.data
290-
post_body << "\r\n--#{@boundary}--\r\n"
291-
else
291+
292+
else
293+
post_body << "--#{@boundary}\r\n"
292294
post_body << "Content-Disposition: form-data; name=\"#{key}\"\r\n\r\n"
293295
post_body << "#{value.to_s}"
294-
post_body << "\r\n--#{@boundary}\r\n"
295296
end
296297
post_body.join
297298
end

0 commit comments

Comments
 (0)