add autosave to attachment.