Another update, to try helping you understand what's the problem (and the solution) could be:
We added the OnTaskError and OnError javascript functions to our pages and this is the alert that our customer receives when he tries to upload a PDF file (inside a pop-up)... the message is "TaskError: FILENAME, undefined":