mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
fix for derpie behavior of successmultiple firing for each upload
This commit is contained in:
parent
ca2a0c057b
commit
fe9b051c87
1 changed files with 8 additions and 2 deletions
|
@ -227,6 +227,8 @@
|
|||
$('#uploadingOverlay').css('display', 'none')
|
||||
}
|
||||
|
||||
allUploadsComplete = false
|
||||
|
||||
Dropzone.options.uploads = {
|
||||
paramName: 'files',
|
||||
maxFilesize: <%= current_site.remaining_space.to_mb %>,
|
||||
|
@ -235,7 +237,8 @@
|
|||
dictDefaultMessage: '',
|
||||
uploadMultiple: true,
|
||||
init: function() {
|
||||
this.on("successmultiple", function(file) {
|
||||
this.on("completemultiple", function(file) {
|
||||
if(allUploadsComplete == true)
|
||||
location.reload()
|
||||
})
|
||||
|
||||
|
@ -246,6 +249,9 @@
|
|||
})
|
||||
|
||||
this.on("totaluploadprogress", function(progress, totalBytes, totalBytesSent) {
|
||||
if(progress == 100)
|
||||
allUploadsComplete = true
|
||||
|
||||
showUploadProgress()
|
||||
$('#progressBar').css('display', 'block')
|
||||
$('#uploadingProgress').css('width', progress+'%')
|
||||
|
|
Loading…
Add table
Reference in a new issue