Uploadify - Passing renamed file back to form

Uploadify - Passing renamed file back to form

Hi,
jQuery noob here! I'm trying out uploadify to upload images & files. Got it all working fine and got it so that it inserts the filename as a hidden form element so I can grab the filename on post and insert into the database -

  1. <script type="text/javascript">
  2.       $(document).ready(function() {
  3.         $('#file_upload').uploadify({
  4.           'buttonImg'   : 'images/browseBtn.png',
  5.           'height'      : 21,
  6.           'width'       : 84,
  7.           'wmode'       : 'transparent',
  8.           'scriptAccess' : 'sameDomain',
  9.           'uploader'  : 'uploadify/uploadify.swf',
  10.           'script'    : 'uploadify/uploadify.php',
  11.           'cancelImg' : 'uploadify/cancel.png',
  12.           'folder'    : 'images/blog',
  13.           'expressInstall' : 'Scripts/expressInstall.swf',
  14.           'auto'      : false,
  15.            onComplete : function(event, queueID, fileObj, response, data)
  16.       {
  17.      $('#filesUploaded').append('<img src='+fileObj.filePath+'>'+'<br />'+fileObj.name+'<input type="hidden" name="uploaded_image" id="uploaded_image" value="images/blog/'+fileObj.name+'" />');
  18.      $("#firstUpload").remove();
  19.       }
  20.         });
  21.       });
  22.       </script>
But I want to rename the file in uploadify.php and pass the renamed value back to the form, so far, I can only get it sending back the original file name.

Any ideas?

Thanks