Re: Error 2038 on large upload

  •  06-15-2011, 9:57 PM

    Re: Error 2038 on large upload

    Hi greggs,
     
    The example below shows you how to catch the upload error message and show your custom message.
     
    <?php require_once "phpuploader/include_phpuploader.php" ?>
    <?php session_start(); ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>example</title>

    </head>
    <body>
        <div>
               <?php
                $uploader=new PhpUploader();
                $uploader->MultipleFilesUpload=true;
                $uploader->InsertText="Upload Multiple File (Max 10M)";
                $uploader->MaxSizeKB=102400;    
                $uploader->AllowedFileExtensions="jpeg,jpg,gif,png,zip,mpg";
                $uploader->Render();
            ?>    
            
    <script>
     function CuteWebUI_AjaxUploader_OnError(msg)
        {
            if(msg.indexOf("2038")!=-1)
            {
            //show the message you want
                alert("The file is locked");
                return false;
            }
        }
        </script>        
        </div>
    </body>
    </html>
     
    Regards,
     
    Ken
View Complete Thread