404 error on AJAX file upload
Solved it !

Explanation : 

A file with a name like 'file.xxx' was present at the root of the site. I removed it and everything started to work.

I then put back an empty file named 'file.txt' at the root of the website, and the same error rose again.

It can happen more often than it seems. In my case, I downloaded a patch for the  filefield module which was named file_something.patch and forgot to delete it after applying. Easy to do, easy to forget, hard to remember once you've moved on to something else.

Bottomline : keep your webroot clean of anything not Drupal or you're in for trouble. Can't believe I lost two days with such a simple problem.

Thanks to Mohammed Shameem for his try, and to anyone who gave this a thought.