0 Replies Latest reply on Jan 11, 2019 7:43 AM by 3400232

    Allow specific file formats into Content Server while check-in

    3400232

      Hi,

       

      We have a requirement to allow only few file formats which needs to be checked-in to Content Server. We have written the below code to do the same in Rule:

      <$trace("#all", "#console")$>

      <$strFileName=strReplace(primaryFile,".",",")$>

      <$trace(strFileName, "#console")$>

      <$exec rsMakeFromString("rsTempFile",strFileName,"ext")$>

      <$exec rsSetRow("rsTempFile", rsTempFile.#numRows-1)$>

      <$if strTrimWs(rsTempFile.ext) like "jde|png|doc|xls|xlsx|docx|jpeg|pptx|pdf|xps|jpg|stg|bmp|txt"$>

      <$else$>

      <$abortToErrorPage("\n\n This file format is not allowed.")$>

      <$endif$>

       

       

      When we try to checkin any other file formats which is specified in the code it gives the error.

       

      But, when we have newly checked-in a document into content server, it checks-in the document but when we try to update the metadata it gives the below error:

       

      Event generated by user 'weblogic' at host 'host name:16200'. csDpSideEffects(File_Format) Error evaluating server script expression.

       

      This file format is not allowed in Content Server. [ Details ]

      An error has occurred. The stack trace below shows more information.

       

      !csUserEventMessage,weblogic,host name:16200!$!csDpSideEffects,File_Format!csDynHTMLServerScriptEvalError!<br><br> This file format is not allowed.
      intradoc.common.ServiceException: !csDpSideEffects,File_Format
      *ScriptStack UPDATE_DOCINFO_SUB

       

      Thanks!