Re: File name append when already present

  •  11-27-2012, 4:50 PM

    Re: File name append when already present

    I have not had much luck implementing this..

    any more direction?

    my code fromt the page where my uploader is..

    <div class="demo" id="uploaderDiv" style="display:none;">                        
           <h1>Selecting multiple files for upload</h1>
    <h2><p>You Can select multiple files and upload multiple files at once.</p>
    <form id="form1" method="POST">
    <?php    

    $uploader=new PhpUploader();
    $uploader->MaxSizeKB=2150400;
    $uploader->Name="myuploader";
    $uploader->MultipleFilesUpload=true;


    if ($dir=="../../")
    {
    $uploader->SaveDirectory="/FTP2/WebDisk/Uploaded_Files/";
    $uploader->InsertText="<br><br>CLICK TO UPLOAD FILE(S)<br>* Max 2 GB *<br><br>Goes to the 'Uploaded Files' Folder.<br><br>";

    }
    else
    {
    $uploader->SaveDirectory=$dir;
    $uploader->InsertText="<br><br>CLICK TO UPLOAD FILE(S)<br>* Max 2 GB *<br><br>Goes to the currently open Folder.<br><br>";

    }
    $uploader->AllowedFileExtensions="*.jpg,*.png,*.gif,*.bmp,*psd,*.tiff,*.tga,*.ind,*.ils,*.eps,*.txt,*.ptf,*.zip,*.rar,*.mp3,*.wav,*.bwf,*.aif,*.m4a,*.omf,*.mov,*.m4v,*.mp4,*m4r,*,sd2,*.caf,*.alac,*.pdf";
    $uploader->Render();
    ?>
    </form>
    <?php

    $fileguidlist=@$_POST["myuploader"];
    if($fileguidlist)
    {
    $guidlist=explode("/",$fileguidlist);
    foreach($guidlist as $fileguid)
    {

    //get the uploaded file based on GUID
    $mvcfile=$uploader->GetUploadedFile($fileguid);
    if($mvcfile)
    {
    $mvcfile->CopyTo("/FTP2/WebDisk/Uploaded_Files/test/".$mvcfile->FileName);
    }
    }

    }


    ?> 

View Complete Thread