Hi Ravi,
It's easy to trim field lengths. Just add a rule that sets the field to the substring of itself and use first of 0 and last of 128 to get the first 128.
Unfortunately, for file attachment names, they are not stored in fields, so you have to write some code. Our qRules plugin let's you manipulate file attachments and their names, but we don't have time to respond here to every code request.
Thanks for your understanding.