I'm trying to dynamically set the file name based on user inputs not yet submitted to the db.
This was what I was attempting, but I'm not sure hwo I can grab this data, manipulate it and process further the new file name (script on maing plugin page):
if(bv_product_num)
{
tb_show('', 'media-upload.php?bv_product=+'+fileNameHere+'&type=image&TB_iframe=true');
retu false;
}
This is what I'm currently trying in my init.php, but I think this is the wrong area to grab this post variable.
function custom_upload_filter( $file ){
/* $file['name'] = 'wordpress-is-awesome-' . $file['name'];
retu $file;*/
$fileNameHere = $_POST["bv_product"];
$file['name'] = 'new value';
//retu $files;
exit(var_dump($fileNameHere));
}
Thoughts on how to interact and update file name?
