Fix #0007118 Attaching an oversized file raises wrong error message