Set Maximum File Limit

  •  04-09-2012, 2:08 AM

    Set Maximum File Limit

    Hi, How do i set maximum file limit from text field.

    I have a form  field name "No Of Spread". Uploader will allow files according to that text filed . See my code below:

    <tr >
          <td colspan="2" >Number of Spreads <span > * </span></td>
        </tr>
        <tr >
          <td colspan="2" ><input  type="text" name="no_of_spreads" id="no_of_spreads" class="EFU_num_req" onblur="BLOCKED SCRIPTCheckSpreads(this.value);"/>
             </td>
        </tr>
        
        <tr >
          <td colspan="2" >Select Spreads <span > * </span></td>
        </tr>
        
        <tr >
          <td colspan="2" ><!--<input id="my_file_element" class="EFU_file_req" type="file" name="file_1" >-->
          
          <?php
                $uploader=new PhpUploader();
                
                $uploader->MultipleFilesUpload=true;
                $uploader->InsertText="Upload Multiple File";
                $uploader->SaveDirectory= plugin_dir_path(__FILE__)."/savefiles";
                $uploader->MaxSizeKB=1024000;    
                $uploader->MaxFilesLimit= '<script language="javascript">
          document.getElementById("no_of_spreads").value();
          </script>';
                //$uploader->UploadUrl="demo2_upload.php";
                $uploader->Name="myuploader";
                $uploader->ManualStartUpload=true;
                $uploader->AllowedFileExtensions="*.jpg,*.png,*.gif,*.bmp,*.png,*.jpeg,*.zip,*.rar";
                
                //Where'd the files go?
                //$uploader->SaveDirectory="/myfolder";
                
                $uploader->Render();
            ?>


    Please Suggest
View Complete Thread