Hi there,
I have almost the same problem. The difference is that I always get the error message. wether I use the toolbar button while composing a page, or using the media manager, the result is the same : error message, but the file is uploaded.
I use the default template, and the latest git version of dokuwiki.
The PHP version is somewhat oudated : 5.1.3RC4-dev, but I cannot upgrade on this hosted site.
Also there is no json support on the PHP side, and this seems to be the problem as the server returns an error message. relevant parts of a tcpdump are attached.
For me, the small attached patch fixed the problem.
Hope this helps,
Schplurtz