When trying to upload a non-picture-file (in my example, a .txt file) as an inline image, the server responds with:
<script type="text/javascript"> (function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|\$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); window.parent.CKEDITOR.tools.callFunction(0, '', "The file is not an image that can be shown inline!"); </script>
But instead of the error message ("The file is not an image that can be shown inline!" in this case), an alert is shown which says: "Incorrect server response." I would suggest to show the actual error message as I assume it to be more helpful than the alert.
I did a bit of investigation. This seems to be due to the fact that CKEditor awaits JSON data as a result and Kernel/Modules/PictureUpload.pm tries to respond with a function in a script tag.
Tested with 10.0 and 10.1 in AgentTicketNote:
When trying to upload a non-picture-file (in my example, a .txt file) as an inline image, the server responds with:
<script type="text/javascript"> (function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|\$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); window.parent.CKEDITOR.tools.callFunction(0, '', "The file is not an image that can be shown inline!"); </script>
But instead of the error message ("The file is not an image that can be shown inline!" in this case), an alert is shown which says: "Incorrect server response." I would suggest to show the actual error message as I assume it to be more helpful than the alert.