Re: File Attributes

  •  12-05-2013, 8:18 AM

    Re: File Attributes

    hi drdx,

     

    1. After uploaded, you can get the upload file info like the code below, it is the server side php code, so I think you can achieve your sql code in it too.

     

    1. <?php     
    2. //Gets the GUID of the file based on uploader name     
    3. $fileguid=@$_POST["myuploader"];     
    4. if($fileguid)     
    5. {     
    6.     //get the uploaded file based on GUID     
    7.     $mvcfile=$uploader->GetUploadedFile($fileguid);     
    8.     if($mvcfile)     
    9.     {     
    10.         //Gets the name of the file.     
    11.         echo($mvcfile->FileName);     
    12.         //Gets the temp file path.     
    13.         echo($mvcfile->FilePath);     
    14.         //Gets the size of the file.     
    15.         echo($mvcfile->FileSize);      
    16.              
    17.         //Copys the uploaded file to a new location.     
    18.         $mvcfile->CopyTo("/uploads");     
    19.         //Moves the uploaded file to a new location.     
    20.         $mvcfile->MoveTo("/uploads");     
    21.         //Deletes this instance.     
    22.         $mvcfile->Delete();     
    23.     }     
    24. }     
    25. ?>   
     

    2. What is the "attribute fields" you mean? Can you explain your question in detail?

     

    Regards,

     

    Ken 

View Complete Thread