The first suggests that the file attached itself, so avoid that. In the second, it’s clear that someone attached the file, so say that. The file is attached is also possible.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.