Good Morning.
Please see the below as an example.
Definition:
Open an attachement in the filestore folder of the Catalog on an SC-Form.
To get this working:
- Create folder: .../FileStore/custom/offering_resources
- Copy a .docx and a .pdf file in this folder
- In SC/Catalog/Forms/Forms: Add a new form
- Put a 'label' component on it.
- In the 'label text' property of that 'label' component, add the text:
<b>The field with the .docx link: <br> L1. <a href="http://SC-HOST:SC-PORT/usm/FileStore/custom/offering_resources/BitlockerMBAM-Settings-V2.docx" target="_blank">The .docx Document </a><br><br><b>The field with the .pdf link: <br>L2. <a href="http://SC-HOST:SC-PORT/usm/FileStore/custom/offering_resources/CA_Svc_Cat_Release_ENU.pdf" target="_blank">The .pdf Document</a>
> Click the link while in form-designer or:
- Form attached to an offering.
- Open a request for this offering
- Click on the 'link' on the form
Resolution:
https://comm.support.ca.com/kb/how-to-open-office-2007-attachments-with-file-extensions-like-docx-xlsx-and-pptx/kb000053331
1. Go to "usm_home\view\webapps\usm\WEB-INF" folder edit "web.xml" file.
2. Search for
<init-param>
<param-name>.js</param-name>
<param-value>text/javascript</param-value>
</init-param>
3a. Add a new MIME type for docx there as below:
<init-param>
<param-name>.docx</param-name>
<param-value>application/vnd.openxmlformats-officedocument.wordprocessingml.document</param-value>
</init-param>
3b. Add a new MIME type for docx there as below:
<init-param>
<param-name>.xlsx</param-name>
<param-value>application/vnd.openxmlformats-officedocument.wordprocessingml.document</param-value>
</init-param>
4. Now place your .docx document inside "usm_home\filestore" folder.
5. Restart Catalog Service.
6. Now provide "<a href="FileStore/r.docx">The Document</a>" as the link to download the file.
7. It will now allow us to download in docx format.
Kind regards, Louis.