Skip to content

Commit 8569803

Browse files
committed
Follow redirects for upload task
1 parent 158cb32 commit 8569803

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/cloudconvert/client.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ def connection
8989
f.request :json
9090
f.request :multipart
9191
f.use CloudConvert::Middleware::ParseJson, content_type: /\bjson$/
92+
f.use FaradayMiddleware::FollowRedirects, callback: lambda { |response, redirect|
93+
redirect.request_headers.delete("Content-Length")
94+
redirect.request_headers.delete("Content-Type")
95+
}
9296
end
9397
end
9498

0 commit comments

Comments
 (0)