Question

In my site I want to upload a zipped folder using ajax.

Code:

<script type="text/javascript">
    $(function(){
     var btnUpload=$('#file_mod');
        new AjaxUpload(btnUpload, {
            action: "index.php",
            name: 'file',
            onSubmit: function(file, ext){
            //alert(file);
                if (! (ext && /^(jpg|png|jpeg|gif|JPG|PNG|JPEG|GIF)$/.test(ext))){
                    // extension is not allowed 
                    return false;
                }           
            },
            onComplete: function(file, response){
            alert("success");
            }
     });
 </script>

But I don't know how ajax is used for zipped file uploading.

What should I change in my code?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top