Not able to open attachments after moving the data From Windows to Linux

Not able to open attachments after moving the data  From Windows to Linux

After moving the server from Windows to Linux, customers are not able to open the file attachments. They get an exception “StrinIndexOutOfBoundsException: String index out of range: -1” as seen in the attached screenshot. This is due to the / and \ slash. In windows the attachment path will be with \ slash which is not accepted in Linux. You can send the below query to the customer so that these entries will be changed in the db.

update sdeskattachment set ATTACHMENTPATH = replace(ATTACHMENTPATH, ‘\\’, ‘/’);

Not able to open attachments after moving the data  From Linux to Windows

MYSQL
——–
update sdeskattachment set ATTACHMENTPATH = replace(ATTACHMENTPATH, ‘/’, ‘\\’);

MSSQL
——–
update sdeskattachment set ATTACHMENTPATH = replace(cast(ATTACHMENTPATH as varchar(1000)), ‘/’, ‘\’);

Need More Help?

Are you looking for a personalized customer support? Submit your question or Call our Toll Free Number to speak with ServiceDesk Plus MSP Expert who can offer a better solution for your requirements.

Submit a Ticket
Email : sdpmsp@manageengine.com
Toll Free : 1-888-720-9500