I’ve got this app that was upgraded from Rails 5.1 to 7.1 recently.
multipart-post
was in the Gemfile.lock in 5.1:
<code>faraday (0.12.0.1)
multipart-post (>= 1.2, < 3)
multipart-post (2.0.0)
</code>
<code>faraday (0.12.0.1)
multipart-post (>= 1.2, < 3)
multipart-post (2.0.0)
</code>
faraday (0.12.0.1)
multipart-post (>= 1.2, < 3)
multipart-post (2.0.0)
But it wasn’t in the 5.1 Gemfile, and it isn’t anywhere in 7.1. It was used only used one time in 5.1 in API code:
<code>require 'net/http/post/multipart'
(etc)
File.open(file_name) do |file|
req = Net::HTTP::Post::Multipart.new url.path,
"sample" => UploadIO.new(file, "audio/mp3", file_name),
(etc)
</code>
<code>require 'net/http/post/multipart'
(etc)
File.open(file_name) do |file|
req = Net::HTTP::Post::Multipart.new url.path,
"sample" => UploadIO.new(file, "audio/mp3", file_name),
(etc)
</code>
require 'net/http/post/multipart'
(etc)
File.open(file_name) do |file|
req = Net::HTTP::Post::Multipart.new url.path,
"sample" => UploadIO.new(file, "audio/mp3", file_name),
(etc)
In it’s documentation it says “bundle add multipart-post” to install, but I was wondering if any other insight on it, as the api code is generally beyond my capacity