Content Management and Capture

 View Only
  • 1.  Limit file size and restrict file types in ICN attachment widget

    Posted Fri October 21, 2022 01:33 AM
    Team,

    Please suggest me the best way to restrict few filetypes and limit the size of files while adding a document from the case information or work details page, by showing a proper error message to the user.
    We are using ICN 3.0.5.

    Thanks in advance.

    ------------------------------
    Nagajyothi Kommareddy
    ------------------------------


  • 2.  RE: Limit file size and restrict file types in ICN attachment widget

    IBM TechXchange Speaker
    Posted Wed October 26, 2022 03:52 PM
    Hi Nagajyothi, 

    I'm going to move your question to the content forum for more visibility and see if we can find an answer for you. 

    Thanks

    ------------------------------
    Stephanie Wilkerson
    IBM
    ------------------------------



  • 3.  RE: Limit file size and restrict file types in ICN attachment widget

    Posted Thu October 27, 2022 08:23 AM
    Hello -

    You can investigate using this ICN plugin:  https://github.com/ibm-ecm/ibm-content-navigator-samples/tree/master/DocumentUploadFilterPlugin

    You can use it to restrict specified mime types from being ingested via ICN.  There are currently no available methods to restrict fie size but you can work to use the DocumentUploadFilterPlugin code to possibly add in file size restrictions.

    -Mark

    ------------------------------
    Mark Jordan
    ------------------------------



  • 4.  RE: Limit file size and restrict file types in ICN attachment widget

    Posted Fri October 28, 2022 10:19 AM
    Hi... I assume you are using FileNet as a repository.

    In that case, you can create a CodeModule with a Java class to do the validation and if the document size exceeds the limit, throw an exception. Then create an Event Action with that Java class and a Subscription to your document class that triggers validation on the Create and Checkin events.

    With this approach, you have your validation regardless of the method used to upload the document to the repository.

    I hope this helps.

    ------------------------------
    Saludos/Regards.
    Sergio Salinas
    DBA ECM Consultant, IBM Expert Labs.

    ------------------------------



  • 5.  RE: Limit file size and restrict file types in ICN attachment widget

    Posted Mon October 31, 2022 10:49 AM
    Hi ,

    You can also do frontend validation to restric the filesize by extending addContentitem dialog on add function. 


    Thanks,
    Ravi Teja 


    --
    Best Regards,
    Ravi Teja M.
    +91 9030529333.