Again. If you are using file upload, it is different than image upload. To get a FILE url, use: $(html).attr(‘href’);
File upload:
window.send_to_editor = function(html){
var file_url = $(html).attr('href');
// Do something with those variables
tb_remove();
};
Image upload:
window.send_to_editor = function(html){
var file_url = $('img', html).attr('src'),
classes = $('img', html).attr('class'),
id = classes.replace(/(.*?)wp-image-/, '');
// Do something with those variables
tb_remove();
};