Made uploading an attachment fire the changed function