getting list of uploaded file information ?

Last post 08-29-2009, 5:01 AM by cutechat. 1 replies.
Sort Posts: Previous Next
  •  08-29-2009, 3:00 AM 55165

    getting list of uploaded file information ?

    Hi,
     
    we are evaluating your product to check whether its easy for us to integrate.  One issue what we faced was how to get list of uploaded files after doing form submission ?. Is  there any call back url that we can feed to your phpuploader object so that it will notify us about the each and every uploaded file ? or is it possible to get list of uploaded files after doing form submission (php side).
  •  08-29-2009, 5:01 AM 55166 in reply to 55165

    Re: getting list of uploaded file information ?

    Hi,
     
    each uploaded file has a key (a guid XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX) ,
     
    when you sepcify $uploader->Name="myuploader"; ,
     
    uploader will render as a <input type='hidden' name="myuploader" id="myuploader" />
     
    after the file uploaded , you can get the value via BLOCKED SCRIPT
     
    var hidden=document.getElementById("myuploader");
    var guidlist=hidden.value;
     
    or using server code if the form is submitted :
     
    $guidlist=$_POST["myuploader"];
     
     
    the guidlist is joined by '/'
     
    XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

     foreach(split("/",$_POST["myuploader"]) as $fileguid)
     {
        $mvcfile=$uploader->GetUploadedFile($fileguid);
    }
     
    and then , you can get the information :
    $mvcfile->FileName,$mvcfile->FilePath,$mvcfile->FileSize,$mvcfile->FileGuid
     
    the $mvcfile->FilePath will be :
     
    persisted.XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.filename.ext.resx
     
    while the $mvcfile->FileName is
     
    filename.ext
     
    Regards,
    Terry
     
     
View as RSS news feed in XML