Link to home
Start Free TrialLog in
Avatar of ITsolutionWizard
ITsolutionWizardFlag for United States of America

asked on

dropzone mvc save files

My MVC website using dropzone to capture photos. and everything is working okay in the following codes.

My question is: After the upload is completed, I want to store file photo name back into the html form.
The following codes already capture the file photo name. However, since user can keep adding & removing the photo,
I want to store list of the photo that already uploaded into html form as list. So when the final submit button is clicked,
I can get the list of photo file name and save into the database.




  <script>
                            Dropzone.options.myAwesomeDropzone = {
                                init: function () {
                                    this.on("removedfile", function (file) {
                                        alert("Are you sure you want to remove this photo " + file.name);
                                        //write ajax codes to remove this file
                                    });
                                }
                            };

                            Dropzone.options.myAwesomeDropzone = {
                                init: function () {
                                    this.on("complete", function (file) {
                                        alert("Save File:  " + file.xhr.responseText);                                        
                                    });
                                }
                            };

                          
                        </script>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Rikin Shah
Rikin Shah
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial