Display file results after uploading

Last post 10-26-2012, 7:57 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  10-25-2012, 8:45 PM 75059

    Display file results after uploading

    Hi 

     

    We tried the demos, if the script is run as below, you can see the file results after uploading:

     

    <?php   
      // Create Uploader object.
        $uploader=new PhpUploader();   
      // Set a unique name to Uploader    
         $uploader->Name="myuploader"; 
      // specify the temporary file location using TempDirectory property    
      $uploader->SaveDirectory="myfolder";
      // Specify the maximum allowed size of the file using MaxSizeKB property    
      $uploader->MultipleFilesUpload=false;
      $uploader->InsertText="Upload File ...";
      $uploader->MaxSizeKB=1024000; 
      $uploader->AllowedFileExtensions="pdf"; 
      //$uploader->FlashUploadMode="Partial";
      //$uploader->ManualStartUpload=true;
      // Render Uploader         
         $uploader->Render();   
     ?>  

     

    However, if we add the form tag, then the results not showing up after uploading:

     

    <form id="form1" method="POST">  
     <?php   
      // Create Uploader object.
        $uploader=new PhpUploader();   
      // Set a unique name to Uploader    
         $uploader->Name="myuploader"; 
      // specify the temporary file location using TempDirectory property    
      $uploader->SaveDirectory="myfolder";
      // Specify the maximum allowed size of the file using MaxSizeKB property    
      $uploader->MultipleFilesUpload=false;
      $uploader->InsertText="Upload File ...";
      $uploader->MaxSizeKB=1024000; 
      $uploader->AllowedFileExtensions="pdf"; 
      //$uploader->FlashUploadMode="Partial";
      //$uploader->ManualStartUpload=true;
      // Render Uploader         
         $uploader->Render();   
     ?>  
        </form>

     

    We need to use the form tag to retrieve the file properties. Can someone help?

     

    Thanks. 

    Filed under:
  •  10-26-2012, 7:57 AM 75072 in reply to 75059

    Re: Display file results after uploading

    Hi DongZheng, 

     

    Please try demo page "ajax-attachments.php", it shows you how to generate the attachment table.

     

    Regards,

     

    Ken 

View as RSS news feed in XML