Skip to content

Instantly share code, notes, and snippets.

@thomasqbrady
Created December 18, 2012 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasqbrady/4331617 to your computer and use it in GitHub Desktop.
Save thomasqbrady/4331617 to your computer and use it in GitHub Desktop.
This was HUGELY helpful.
Seeing something odd. Walking down that line,
msg = inbox.get_item items[0].item_id
Works fine. I can see some attributes, such as:
msg.item_id
=> "AAMkAGEzNmExNzEzLTcxMjEtNDM5YS04NmE0LWE0NWU3MWZiMjEwNgBGAAAAAAB4VZcbdHrATrbGrKL0ANCfBwCjSVkOjPEtQoJN3xOKeIYJAAzyZ5e9AACjSVkOjPEtQoJN3xOKeIYJAA25w05NAAA="
When I trace the whole object, I see that there's a node for attachments with a file_attachment inside:
:attachments=>{
:file_attachment=>{
:content_type=>{:text=>"image/png"},
:content_id=>{:text=>"94C552FB-8474-437C-AB44-DDF809047AB9"},
:attachment_id=>{:id=>"AAMkAGEzNmExNzEzLTcxMjEtNDM5YS04NmE0LWE0NWU3MWZiMjEwNgBGAAAAAAB4VZcbdHrATrbGrKL0ANCfBwCjSVkOjPEtQoJN3xOKeIYJAAzyZ5e9AACjSVkOjPEtQoJN3xOKeIYJAA25w05NAAABEgAQAK9ad+6BP7VHru83AO7CTrU="},
:name=>{:text=>"Hollowbody 2.png"}
}
},
But when I do
msg.attachments
=> []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment