[V4] Resourcified attachments

rebased #430.