Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Super Contributor.. Andy_HPSM Super Contributor..
Super Contributor..
4813 views

Attachment types in SM 9.40

Jump to solution

We just upgraded from SM 9.32 to 9.40.  In 9.40 if I try to add an attachment that is a .xlsx or .docx I get an error. The error is "Failed! Such type of file is not allowed as an attachment."  See attached screen shot for the error.

 

I added an entry in the EXTENSIONSTATEM1 table for xlsx and set the unsafe value to false , but I still get the error.

 

Where do I allow attachments of a certain type?

 

I am able to add files of type .csv , .gif , .jpg , .txt , etc...

 

I am doing this is falcon so user privileges shouldn't be an issue.

 

Thanks for any help!

Tags (1)
1 Solution

Accepted Solutions
Highlighted
Absent Member.. John Stagaman Absent Member..
Absent Member..

Re: Attachment types in SM 9.40

Jump to solution

9.40 now has a whitelist for attachments at the web-tier level (a  separate mechanism from the extensionstate table). However the web.xml setting for web tier is a strict whitelist: only the listed files can be uploaded.

 

If you search the SM Help for the topic "Support for blocking attachments with certain file extensions" for complete details.

 

The whitelist of extensions has multiple parameters, allowing for different restrictions for file upload, image, and attachment  objects:

 

 <servlet>

    <description> File Upload Servlet.</description>   .......skipped.......

          <param-name>allowed</param-name>

          <param-value>bmp,jpg,jpeg,png,gif,txt,log,unl,csv</param-value>

   .......skipped.......   

 

<servlet>

    <description>  Image Upload Servlet.</description>

   .......skipped.......

          <param-name>allowed</param-name>

          <param-value>bmp,jpg,jpeg,png,gif</param-value>

   .......skipped.......  

 

<servlet>

    <description> Attachment upload servlet.</description>

   .......skipped.......

          <param-name>allowed</param-name>

          <param-value>bmp,jpg,jpeg,png,gif,txt,log,unl,csv</param-value>

   .......skipped.......  

 

<servlet>

    <description> Attachment upload servlet for AJAX request.</description>

   .......skipped.......

          <param-name>allowed</param-name>

          <param-value>bmp,jpg,jpeg,png,gif,txt,log,unl,csv</param-value>

   .......skipped.......  

 

<servlet>

    <description>Unique attachment upload servlet.</description>

   .......skipped.......

          <param-name>allowed</param-name>

          <param-value>bmp,jpg,jpeg,png,gif,txt,log,unl,csv</param-value>

   .......skipped.......  

----------------------------------------------------
Kudos - what, where, how, and why
Want Good Answers? Ask Good Questions...
8 Replies
Super Contributor.. Andy_HPSM Super Contributor..
Super Contributor..

Re: Attachment types in SM 9.40

Jump to solution

I'll also add that the documentation did mention that updates to the File Extension list required a restart of the web server (Apache Tomcat in this case) and I did that after making the addition, but that did change the behavior.

0 Likes
Highlighted
Absent Member.. John Stagaman Absent Member..
Absent Member..

Re: Attachment types in SM 9.40

Jump to solution

9.40 now has a whitelist for attachments at the web-tier level (a  separate mechanism from the extensionstate table). However the web.xml setting for web tier is a strict whitelist: only the listed files can be uploaded.

 

If you search the SM Help for the topic "Support for blocking attachments with certain file extensions" for complete details.

 

The whitelist of extensions has multiple parameters, allowing for different restrictions for file upload, image, and attachment  objects:

 

 <servlet>

    <description> File Upload Servlet.</description>   .......skipped.......

          <param-name>allowed</param-name>

          <param-value>bmp,jpg,jpeg,png,gif,txt,log,unl,csv</param-value>

   .......skipped.......   

 

<servlet>

    <description>  Image Upload Servlet.</description>

   .......skipped.......

          <param-name>allowed</param-name>

          <param-value>bmp,jpg,jpeg,png,gif</param-value>

   .......skipped.......  

 

<servlet>

    <description> Attachment upload servlet.</description>

   .......skipped.......

          <param-name>allowed</param-name>

          <param-value>bmp,jpg,jpeg,png,gif,txt,log,unl,csv</param-value>

   .......skipped.......  

 

<servlet>

    <description> Attachment upload servlet for AJAX request.</description>

   .......skipped.......

          <param-name>allowed</param-name>

          <param-value>bmp,jpg,jpeg,png,gif,txt,log,unl,csv</param-value>

   .......skipped.......  

 

<servlet>

    <description>Unique attachment upload servlet.</description>

   .......skipped.......

          <param-name>allowed</param-name>

          <param-value>bmp,jpg,jpeg,png,gif,txt,log,unl,csv</param-value>

   .......skipped.......  

----------------------------------------------------
Kudos - what, where, how, and why
Want Good Answers? Ask Good Questions...
Super Contributor.. Andy_HPSM Super Contributor..
Super Contributor..

Re: Attachment types in SM 9.40

Jump to solution

Thanks for the information John, just what I was looking for.

0 Likes
Absent Member.. jselander Absent Member..
Absent Member..

Re: Attachment types in SM 9.40

Jump to solution

Just for clarity, these web.xml enhancements above will also be in the upcoming release of web-tier 9.35.

0 Likes
StacyWhetzell Super Contributor.
Super Contributor.

Re: Attachment types in SM 9.40

Jump to solution

I have the same problem with one and only one instance of SM9.41.  I can attach these file types via Windows Client, but not via Web.  I get same message as you on WEb - even though I have added those file types to the web.xml file for each tomcat node.

I am going to try clearing the TC cache (not sure a Tomcat restart does that) and see if that fixes it.  I have a case opened with HPE SSO.

Stacy

StacyWhetzell Super Contributor.
Super Contributor.

Re: Attachment types in SM 9.40

Jump to solution

see  my earlier post.  I already modified the web.xml in all the places you show.  Restarted TC, Apache, and SM app service.  No joy.  Still cannot attach via web client.

HPE has suggested clearning the TC Cache

I will try that

Stacy Whetzell

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Attachment types in SM 9.40

Jump to solution
Hi Stacy, Clearing the TC cache is a good practice. The TC cache retains the old recs and settings. Old cache can cause some pretty weird results especially after an upgrade. After previous experience in trying getting SRC/KM and SM integration where TC cache clearing was critical, I always clear my TC cache whenever I change any TC files these days. It does not impact performance much and does not take TC long to fill the cache again. If you want to be more specific with your clearing, the cache will always have a folder name that matches the app name. You can just delete the same folder name in the cache to specific clear that app cache. Good luck.
0 Likes
omerfarukaydin Regular Contributor.
Regular Contributor.

Re: Attachment types in SM 9.40

Jump to solution

make sure to fill file type in the attachmentwhitelist table...

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.