Re: Problems with installation of File Uploader. Error message, no dialog showing, upload button does nothing

  •  12-18-2012, 8:13 AM

    Re: Problems with installation of File Uploader. Error message, no dialog showing, upload button does nothing

    you can see it working here: http://www.freebizwebsite.com.au/uploadertest.php

     

    there doesn't appear to be any error message with that code right now...but it still doesn't work on my actual web page

     

     

     the code is:

     

     

    <?php

    require_once "phpuploader/include_phpuploader.php";

    session_start();


    //Gets the GUID of the file based on uploader name
    $fileguid=@$_POST["myuploader"];
    if($fileguid)
    {
        //get the uploaded file based on GUID
        $mvcfile=$uploader->GetUploadedFile($fileguid);
        if($mvcfile)
        {
            //Gets the name of the file.
            echo($mvcfile->FileName);
            //Gets the temp file path.
            echo($mvcfile->FilePath);
            //Gets the size of the file.
            echo($mvcfile->FileSize);

            //Copys the uploaded file to a new location.
            $mvcfile->CopyTo("/uploads");
            //Moves the uploaded file to a new location.
            $mvcfile->MoveTo("/uploads");
            //Deletes this instance.
            $mvcfile->Delete();
        }
    }

    //Step 2: Create Uploader object.
    $uploader=new PhpUploader();
    //Step 3: Set a unique name to Uploader
    $uploader->Name="myuploader";
    // specify the temporary file location using TempDirectory property
    $uploader->TempDirectory="/temp";
    // Specify the maximum allowed size of the file using MaxSizeKB property
    $uploader->MaxSizeKB=3000;
    //Step 4: Render Uploader
    $uploader->Render();

    ?>

View Complete Thread