Troubleshoot > Troubleshooting: Clients > Troubleshooting: Unable to view an attachment from the Web client

Troubleshooting: unable to view an attachment from the web client

Why can I not open an attachment in a record (for example, an incident record) from the web client?

The getAbsolutePath() function in Attachment.java returns the full paths of attachments. The web tier supports long full paths (greater than 255 characters) for attachments when running on Linux, Unix, or Windows with an NTFS file system (not a FAT file system).

If the web tier is running on Windows with a FAT file system, and if the attachment file full path is greater than 255 characters, you cannot open the attachment. This issue is most likely to occur on WebSphere systems where the deployment path to the temp directory is prefixed by various WebSphere node name and server names, and attachment file full paths are dependent on the length of WAR file name and the installation path of the web application server.

The following is an example of a full path to an attachment that is greater than 255 characters, where the "x" string represents the unique directory created for each user session that handles attachment files:

/app/IBM/WebSphere7/AppServer/profiles/AppSrv01/temp/qasolaris01Node01/server1/PROD_webtier-7_02_013_P3_ear_SSO_HELP_SRVRPROD_webtier-7_02_013_P3_ear_SSO_HELP_SRVR_war/PROD_webtier-7_02_013_P3_ear_SSO_HELP_SRVRPROD_webtier-7_02_013_P3_ear_SSO_HELP_SRVR.war/attachments/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/sm_attachment.txt

Note If you use a very long file name or folder name, which causes the full path of the file to exceed 255 bytes, you will not be able to delete the web application server's temporary file/folder that is generated when you upload the file (normally, this is located in the web application server installation directory). Deleting the temporary file/folder will fail with a system warning message that states the file name is too long. In this case,follow these steps to delete the file:

  1. Rename the temporary file to a short name, and then delete it.
  2. If the deletion still fails, open the system command prompt, type dir /x to display the file's short name, and then run the rmdir {short name} /S command to delete the folder.

Related topics

Web client
Attachments