Open prathamesh-sonpatki opened 11 years ago
I would like this to be implemented too, but you could do something like this:
sub_params = { :'contact[first_name]' => 'prathamesh', :'contact[language]' => 'Ruby' }
params = sub_params.merge({ "file" => UploadIO.new(csv, "text/csv", "test.csv") })
request = Net::HTTP::Post::Multipart.new(url.path, params)
to get the desired params in Rails.
@NicoSantangelo / @prathamesh-sonpatki , if you just continue the work I did i my pull request (https://github.com/nicksieger/multipart-post/pull/30) I think you can solve this pretty easy :-)
It would be good to support this. PR welcome.
I want to send some nested params with the file. Is it not getting send properly.
For example
On Rails side, i get
Nested attributes
first_name
andlanguage
are delimited. But they should be not.Right now,
parts
are created assuming thatvalue
isString
. So it is failing here wherevalue
isHash
like in case of nested hash.