Updated controller for single attachment