Hello all,

How do I ask the test object to upload files?
Here's the source code for dragging files to the drop zone:

 <form action="/uploadsave" method="post" class="dropzone" id="dropzoneform" 
enctype="multipart/form-data">  </form>
 <script type="text/javascript">        Dropzone.options.dropzoneform = {       
                                                        init: function() {      
                uploadMultiple: true,                   
this.on("queuecomplete", function() {                                           
                console.log("queue completed.");                                
window.location.reload(true);                    });                            
                this.on("success", function(file, response) {                   
        console.log(file.name + " files successfully uploaded.");               
        });                     this.on("error", function(file, errorMessage) { 
                        console.log(errorMessage);                      });     
        }       };  </script>

And the source code for selecting a file to submit:

   <form action="/uploadsave" id="uploadform" method="post" 
enctype="multipart/form-data" style="display:block">     <label 
for="idupload">Upload A New File: </label>     <input type="file" name="file" 
id="idupload" style="display:inline"  >   </form>   <script>      
document.getElementById("idupload").onchange = function() {         
document.getElementById("uploadform").submit();      }   </script>

Thanks!

Ni

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to