I had a problem that most of the time I had to upload a file, and I had to use a HTML upload, and that's kind of bad, so I created something to use the Thickbox and the WordPress Uploader.
To use you must enqueue in the page used both the style and the script of the plugin:
`
admin_url( 'media-upload.php?post_id=0&button=' . rawurlencode('Use as Avatar') . '&TB_iframe=1&width=640&height=253' )
);
?>
"; ?>
Having the
uc-call
for the link,
uc-answer
with the input field and
uc-container` for the box with both the link and the input field.
All the stuff is customizable by passing the variables in to the array
$args
, some stuff must be passed in the url, but later on I will add a easier way to do it.