Improve attachment export
Merge pull request #1 from diver80/master

Improve attachment export