What I do is save the attachment to the local temp folder, then do what I need with it.