Attachment loses its file extension when length of the filename exceeds the limit

stevedag
Kilo Expert

Is there a way to keep the file extension when a user puts an attachment with a filename that exceeds the limit set in ServiceNow?

 

I know we can change the maximum lenght of the filename in the sys_attachment table, but that's not what I want.     I would like to cut the filename to the default 100 caracters limit, but to keep its file extension.   This way, although the filename has been truncated, our users will still be able to open it.


Thanks!

Steve

23 REPLIES 23

You need to make sure the filename of the attachment includes the file extension also.   If not, rename the file with the extension and ServicenNow will be able to open it.   Even for truncated names, you can rename and add the extention so Internet Explorer know which program to use to open it.



I hope it helps you.



Steve


It is Steve. The filename.extension is how I saved it. But for the file names more than 100..it is asking which program to open with.


Gurpreet07
Mega Sage

Are you modifying the dictionary value for Max Length of field file_name for sys_attachment table ? if not then try to increase the length to 256 .It should work.


Yes Gurpreet. I changed the file_name on the sys_attachment table to 260. and I mentioned, in spite of having the


Filename. extension the form I saved it, when I try to open the file, it asks me which format/program it shall open with as opposed to opening on its own when the file name length exceeds 100.



Any help would be appreciated.


Ravali
.


Could it be you don't have a program assigned to the file extension!



What is the name of the file when you download it from ServiceNow?