Add/Remove and attachment in a transaction doesn't trigger the Client nor the Server scripts. As the record doesn't need to be in Edit mode to attach a file the Client script can't run. And the form is also not "saved" so you can't use a before or after submit either.