Parsing octet streams from Mandrill attachments

I’m using Mandrill inbound to receive a CSV via email then parse it. Mandrill’s web hook sends attachments as “application/octet-stream” I’m not sure of the best way to convert this back into a CSV:

 "base64" => true,
  "content" => "UGxhbnQsRHVlIERhdGUsUGxhbnQgQ2FwYWNpdHksTVNGDQpDU0MtR0EsMjAyMy0wOC0xMS...",
  "name" => "Test.csv",
  "type" => "application/octet-stream"

Any help would be much appreciated (or if you know a Mandrill configuration that makes this easier).

The "base64" => true flag makes me think that "content" is just the CSV base64 encoded. Try doing Base.decode64(content)

3 Likes