Secure the method to get an attachment