prepare attachs