Added changes to js/attachment.js file