fixed open attachment

delete record and photo from storage right after attaching them to a
message