Question

Limiting email attachment type and size

Is there a way to prevent incoming and outgoing emails from generating all of the tiny image file attachments in the linked records attachments tab?  For example, I receive and mark as processed an email from a vendor.  That email has a dozen image files attached to it for all of their social media links, website links, photos etc.  It also has one actual word file that I need but I don't even see that file in the attachments tab unless I keep scrolling down past the other 12 image files.

Is there a filter or business rule that would allow me to stop certain file extensions or file types or set a minimum file size from becoming bpm attachments to stop all of the attachment clutter?

Like 0

Like

1 comments

Hello Scott,



If I understood you right, the you need to achieve is to create size limit for files that you can attach to entity. One of the ways to do it to create event subprocess on "inserting" where the size should be checked:

 

int size = Entity.GetTypedColumnValue<int>("Size");

if (size > 1048576)

    throw new Exception("Размер вложенного файла превышает 1 Мб");

return true;



Also, Size can be limited by web server itself.

In the application configuration file

Terrasoft.WebApp \ Web.config

see the <requestLimits maxAllowedContentLength = "104857600" />

This is the limit for the any data downloaded to the server in bytes.



Best regards, 

Alex

 

Show all comments