Problem With Single file Upload

Last post 10-02-2011, 9:03 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  10-01-2011, 2:38 AM 70249

    Problem With Single file Upload

    hi m using the phpuploader but  i want the functionlity that the user only upload the single file at a time,I   tried all the configuration to restrict the user only upload a single file. but is not working
    here is code below
     
    $uploader->InsertText="Upload File (Max 10M)";
       
       $uploader->MaxSizeKB=1024000; 
       $uploader->AllowedFileExtensions="jpeg,jpg,gif,png,zip";
       $uploader->MaxFilesLimit=1;
       //Where'd the files go?
       $uploader->SaveDirectory="/uploads";
       
       $uploader->Render();
     
    but every time i uplod the first file it again open the file upload dialog box, i want that whenever user upload first file the upload button will be disable or it will show the alert box say "you cannot upload more the one file "
     
    thankyou in advance
     
    Filed under: ,
  •  10-02-2011, 9:03 PM 70256 in reply to 70249

    Re: Problem With Single file Upload

    Please set the following property to false.
     

    Uploader.MultipleFilesUpload Property

     
    If true, the users are able to select multiple files in the file browser dialog then upload them at once. 
     
    Example Code 

    1. <?php require_once "phpuploader/include_phpuploader.php" ?>   
    2. <html>   
    3. <body>   
    4.         <form id="form1" method="POST">   
    5.             <?php   
    6.                 $uploader=new PhpUploader();   
    7.                 $uploader->Name="myuploader";   
    8.                 $uploader->MultipleFilesUpload=true;   
    9.                 $uploader->Render();   
    10.             ?>   
    11.         </form>   
    12. </body>   
    13. </html>  

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML