Search This Blog

Tuesday, January 24, 2012

Preserve case parameter in addattachment function

Below post is helpful to those who have encountered an issue with the file extension getting converted to lower case  instead of retain the same.

We use add_attachment(list_of_param....) to upload files to the server.
Inside the Add_attachment(list_of_param....) function there is a builtin library function addattachment(list_of_param....) which actually uploads the file in the server.

There is one parameter called preserve case which helps to retain the extension which user had uploaded.
By default, it is set to false.
That means if user uploaded "Test_File.TXT" , the file name on the server will be "Test_File.txt".

There could some cases where you feel the extension of the file should not change.
In that case , change the value to 'true'.

AddAttachment(URLDestination, DirAndFilename, FileType, UserFile[, MaxSize]                                                                     [, PreserveCase, UploadPageTitle])

Above syntax is from tools version 8.49

No comments: