Reputation: 19247
We're using a third party web service that POSTS multipart data (a file) back to us. But it ALSO passes an extra param via the url http://ourdomain.com/theposturl?extra=good
the 'filename' object with :filename and :tempfile for the binary data are in params[]
but how do we get the "good" off of the url?
post /theposturl
puts params.inspect # this shows a hash with filename,
# :filename and :tempfile as expected
extra_param = ??????[:extra] # but what lets us 'read' the ?extra=good off the url
end
Upvotes: 3
Views: 3452
Reputation: 453
You need to use a string as the hash key.
extra_param = params["extra"]
Upvotes: 10