2 uploader in the same page

Last post 01-28-2011, 8:40 AM by Eric. 1 replies.
Sort Posts: Previous Next
  •  01-27-2011, 2:37 PM 65919

    2 uploader in the same page

    Can we have 2 of them in the same page ?
     
    1. <table>  
    2.                     <tr>  
    3.                         <td><span class="titreUpload">Votre photo de nouvelle principale</span></td>  
    4.                     </tr>  
    5.                     <tr>  
    6.                         <td>  
    7.                         <?php     
    8.                           
    9.                             $nomDossier = $_REQUEST['nouvelleImage'];  
    10.                               
    11.                             $uploaderPrincipale=new PhpUploader();     
    12.                          
    13.                             $uploaderPrincipale->MultipleFilesUpload=false;     
    14.                             $uploaderPrincipale->InsertText="Téléverser votre image principale";     
    15.                             $uploaderPrincipale->AllowedFileExtensions="jpg, png, gif, tga";  
    16.                                  
    17.                             $uploaderPrincipale->MaxSizeKB=20000;        
    18.                                  
    19.                             $uploaderPrincipale->SaveDirectory="../images/nouvelles/".$nomDossier."/photoPrincipale";     
    20.                                  
    21.                             $uploaderPrincipale->FlashUploadMode="Partial";     
    22.                                  
    23.                             $uploaderPrincipale->Render();     
    24.                         ?>  
    25.                         </td>  
    26.                     </tr>  
    27.                     <tr>  
    28.                         <td><span class="titreUpload">Vos photos de nouvelle secondaires</span></td>  
    29.                     </tr>  
    30.                     <tr>  
    31.                         <td>  
    32.                         <?php     
    33.                           
    34.                             $nomDossier = $_REQUEST['nouvelleImage'];  
    35.                               
    36.                             $uploaderSecondaire=new PhpUploader();     
    37.                          
    38.                             $uploaderSecondaire->MultipleFilesUpload=true;     
    39.                             $uploaderSecondaire->InsertText="Téléverser vos images secondaires";     
    40.                             $uploaderSecondaire->AllowedFileExtensions="jpg, png, gif, tga";  
    41.                                  
    42.                             $uploaderSecondaire->MaxSizeKB=20000;        
    43.                                  
    44.                             $uploaderSecondaire->SaveDirectory="../images/nouvelles/".$nomDossier."/photoSecondaires";     
    45.                                  
    46.                             $uploaderSecondaire->FlashUploadMode="Partial";     
    47.                                  
    48.                             $uploaderSecondaire->Render();     
    49.                         ?>  
    50.                         </td>  
    51.                     </tr>  
    52.                 </table> 
     
  •  01-28-2011, 8:40 AM 65935 in reply to 65919

    Re: 2 uploader in the same page

    Dear mikhellqc,
     
    Multiple instances of php uploader are supported. Please add the highlighted line in your code and try it again.
     
    <?php
       $uploader=new PhpUploader();
       $uploader->Name="myuploader";
       $uploader->MultipleFilesUpload=false;
       $uploader->InsertText="Upload File (Max 10M)";   
       $uploader->MaxSizeKB=1024000; 
       $uploader->AllowedFileExtensions="jpeg,jpg,gif,png,zip";   
       $uploader->SaveDirectory="savefiles";
       $uploader->Render();
       
       $uploader1=new PhpUploader();
       $uploader->Name="myuploader2";
       $uploader1->MultipleFilesUpload=false;
       $uploader1->InsertText="Upload File (Max 10M)";   
       $uploader1->MaxSizeKB=1024000; 
       $uploader1->AllowedFileExtensions="jpeg,jpg,gif,png,zip";
       $uploader1->SaveDirectory="savefiles1";   
       $uploader1->Render();   
      ?> 
     
    Thank you for asking
     
View as RSS news feed in XML