Saving temporary file name after uploading file with uplodify

Posted by mIRU on Stack Overflow See other posts from Stack Overflow or by mIRU
Published on 2010-03-26T19:33:40Z Indexed on 2010/03/26 19:43 UTC
Read the original article Hit count: 205

Filed under:
|
|

I have this script

if (!empty($_FILES)) {
 $tempFile = $_FILES['Filedata']['tmp_name'];
 $targetPath = dirname(__FILE__).$_POST['folder'] . '/';
    $pathinfoFile = pathinfo($_FILES['Filedata']['name']);

 $targetFile =  str_replace('//','/',$targetPath) .uniqid().'.'.$pathinfoFile['extension'];

 move_uploaded_file($tempFile,$targetFile); }

this script is from uplodify , modified for saving the file with unique name , i need after user will upload the file , this unique name and original name , to save temporary , when user will submit the form , this temporary variables i will insert in database , the problem is that in firebug console , i can not see all the actions of this script , and i can not understand the way how to fix it, I tried to save in $_SESSION but i have problems , is not saving , i found why is not working with $_SESSION , http://uploadify.com/forum/viewtopic.php?f=5&t=43 , i tried the solution from forum but without result , exist a more easy way to solve this problem ? , or what is better way to do it ? . Sorry for so silly question , i ran out of ideas . Thanks a lot for helping me , and sorry again for my English

© Stack Overflow or respective owner

Related posts about uploadify

Related posts about jQuery