Update to js for attachment