Security is perhaps one of the most critical aspects in the cloud world, if not the most critical one. Salesforce does not have a default way to prevent users from uploading certain types of files. This is a huge security risk, especially when your Salesforce application is publicly exposed through sites.com.
After all, the last thing you need is a harmful file uploaded in Salesforce, infecting your network and corrupting or exporting your sensitive data.
But no need to freak out- with Salesforce, there's always a work around.
All you have to do is create a trigger on Attachment object- yes, it's true, writing a trigger on Attachment object is possible.
How? Continue reading…