update attachments task to work with new collection api