Monday, 14 December 2020

Oracle Apex Form Download File link error - Server sent an invalid response.

I had the following problem reported by a user of one of my Apex applications when they were trying to download an attachment that had been added to a record as a clob using the built in functionality for Apex clob form fields. The error message wasn't very informative and gave "server name sent an invalid response."

The issue seemed to be that the file name the user was adding included commas in it which is obviously allowed in Windows but maybe not in other system processes. Once I removed the commas the download worked fine again.

In order to remove unwanted characters in file names I added the following code to the insert trigger on the Attachment table to automatically update them

-- Check and update Filename remove unwanted characters 


       :NEW.FILE_NAME := REPLACE ( REPLACE ( REPLACE ( :NEW.cat_FILE_NAME, CHR(44), NULL ), CHR(59), NULL ), CHR(39), NULL ) ;   

No comments:

Post a Comment