Skip to content

Commit

Permalink
Fix multi file upload duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
codingjoe committed Jun 6, 2022
1 parent 10ec9d9 commit 4a21786
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions s3file/static/s3file/js/s3file.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,6 @@
hiddenFileInput.name = name
hiddenFileInput.value = parseURL(result)
form.appendChild(hiddenFileInput)
var hiddenSignatureInput = document.createElement('input')
hiddenSignatureInput.type = 'hidden'
hiddenSignatureInput.name = name + '-s3f-signature'
console.log(fileInput.dataset.s3fSignature)
hiddenSignatureInput.value = fileInput.dataset.s3fSignature
form.appendChild(hiddenSignatureInput)
})
fileInput.name = ''
window.uploading -= 1
Expand Down Expand Up @@ -132,6 +126,11 @@
hiddenS3Input.name = 's3file'
hiddenS3Input.value = input.name
form.appendChild(hiddenS3Input)
var hiddenSignatureInput = document.createElement('input')
hiddenSignatureInput.type = 'hidden'
hiddenSignatureInput.name = input.name + '-s3f-signature'
hiddenSignatureInput.value = input.dataset.s3fSignature
form.appendChild(hiddenSignatureInput)
})
inputs.forEach(function (input) {
window.uploading += 1
Expand Down

0 comments on commit 4a21786

Please sign in to comment.