We’re using an external virus scanner in our company. When a user wants to upload a file the firewall detects this and reroutes the file to the virusscanner before passing the file on to Moodle.
When there is something wrong with the file i.e. contains a virus, is password protected, etc etc it will send a specific header respons to the client depending on what it has found.
We want to intercept the header response and display a message to the user.
I tried to use an AJAX interceptor (jQuery listener) script, but the 4nn response header is never picked up by the script. Then I tried to use specific (webserver) errorDocuments redirects but this does not work either.
When using the developermode of the browser (FF) this is what I see, in this case of uploading a password protected file.
Filepicker.js : TypeError : data is null (@line 623)
Network tab :
/repository/repository_ajax.php?action=upload HTTPS POST 416 text/html 0,86 kB 1.29 s klik 314516 1109 188 0 0 0
416 is the header http status code the virusscanner sends us, which means the file is password protected and therefore not allowed.
(If the scanner detects nothing the file is uploaded fine to Moodle)
Has anyone encountered this? And got around it?