cancel
Showing results for 
Search instead for 
Did you mean: 

Document max file size by type

adgonzal21
Champ in-the-making
Champ in-the-making
Is it possible configure the maximum size for file uploading by type?.
For example I want to allow pdf files with &0MB max size and mp3 files with 30MB max size.

Thanks in advance
2 REPLIES 2

parzgnat
Star Contributor
Star Contributor
I don't know of an out-of-the-box way to do this in Alfresco.  Alfresco doesn't determine the mimetype of the document until after it's completely uploaded.  The only thing I could think of would be to create a custom behavior that implements OnCreateNodePolicy and check the mimetype content size when a node is being created and throw an exception if it violates your sizing constraints.  However, using this method, it would be difficult to get a meaningful error message back to the user interface.

Here is useful article for implementing behaviours: http://ecmarchitect.com/images/articles/alfresco-behavior/behavior-article.pdf

adgonzal21
Champ in-the-making
Champ in-the-making
Thank you very much.
I've imagined it since the mimetype is detected at the end of the upload process. I'll try your proposal.