Align attachments API closer to the spec