[V5] Resourcified attachments

rebased #465.