Noong Miyerkules, Setyembre 12, 2012 ng 3:32:40 PM UTC+8, si Konstantin ay sumulat:
Can someone help me?
I had a similar problem where previously uploaded files were included in the next upload. Try the following solution.
On Add Function just add "change" event of the file input element like below:
$('#YourFileUploadElementId').change(function(e) {
data.files.splice(0); // Clear All Existing Files
});
Full Example Below:
$('#YourFileUploadElementId').fileupload({
// Some options
add: function (e, data) {
$('#YourFileUploadElementId').change(function(e) {
data.files.splice(0); // Clear All Existing Files
});
},
// Other Events
});
Note: Just change the YourFileUploadElementId to your file upload element id.