I'm integrating an image upload action, on the options page for my plugin.
It works, but the thickbox dialog sits with a message "crunching" and never completes. Checking the console in Firebug shows that the error message "you are not allowed to edit this item" is being returned.
I can get past the error by add_cap("edit_posts") to the user's role -- but I really cannot do that since it opens up too many other privileges in Admin.
So, how does one use media-upload to simply upload an image and get back the resulting URL -- without media-upload thinking that the user needs edit_posts capability? The call to the uploader from jQuery click event looks like this:
tb_show('Upload a Image', 'media-upload.php?referer=media_page&type=image&TB_iframe=true&post_id=0', false);