Separate method to create attachment for the sake of reusability #4697