Re: how to deal with duplicate file name

  •  05-30-2011, 11:38 AM

    Re: how to deal with duplicate file name

    1.  <form id="form1" method="POST">  
    2.                 MaxSizeKB=10240;  
    3.                     $uploader->Name="myuploader";  
    4.                     $uploader->InsertText="Select multiple files (Max 10M)";  
    5.                     $uploader->AllowedFileExtensions="*.jpg,*.png,*.gif,*.txt,*.zip,*.rar";      
    6.                     $uploader->MultipleFilesUpload=true;  
    7.                     $uploader->Render();  
    8.                 ?>  
    9.               
    10.             </form>  
    11.   
    12.   
    13.   
    14.   
    15. GetUploadedFile($fileguid);         
    16.         if($mvcfile)         
    17.         {         
    18.         $mvcfile->MoveTo("/home/ftp/iphone4tw/attach/test/uploads/iPhone4TW-".date("H-i-s")."_".$mvcfile->FileName);   
    19.         }      
    20.     }      
    21.   
    22. }  
    23. ?>  
    24.   
    25. <script type="text/javascript">  
    26.     function CuteWebUI_AjaxUploader_OnTaskComplete(task)  
    27.     {  
    28.         var div=document.createElement("DIV");  
    29.         div.innerHTML=" [ img]http://attach.iphone4.tw/test/uploads/" + task.FileName + "[/img]<br>";  
    30.         document.body.appendChild(div);  
    31.     }  
    32.     </script>    
    I have problem to show the final file name here , and file lsit suddenly gone  forever
     
    here is my test page , pls advise , thanks
     
     
     
     
View Complete Thread