Fixed attachments upload issue. Fixes #28 .