Skip to content

Commit

Permalink
Disable dropzone's timeout (#12024) (#12032)
Browse files Browse the repository at this point in the history
Dropzone 4.4 introduced a 30s XHR timeout that will kill any upload
still in progress. This disable that timeout again.

Ref: https://www.dropzonejs.com/#config-timeout
Ref: #10645
Ref: https://xhr.spec.whatwg.org/#the-timeout-attribute
Fixes: #12022
Fixes: #11906

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
  • Loading branch information
silverwind and lunny authored Jun 24, 2020
1 parent 12f51ec commit d059156
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web_src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@ async function initRepository() {
dictInvalidFileType: $dropzone.data('invalid-input-type'),
dictFileTooBig: $dropzone.data('file-too-big'),
dictRemoveFile: $dropzone.data('remove-file'),
timeout: 0,
init() {
this.on('success', (file, data) => {
filenameDict[file.name] = {
Expand Down Expand Up @@ -2308,6 +2309,7 @@ $(document).ready(async () => {
dictInvalidFileType: $dropzone.data('invalid-input-type'),
dictFileTooBig: $dropzone.data('file-too-big'),
dictRemoveFile: $dropzone.data('remove-file'),
timeout: 0,
init() {
this.on('success', (file, data) => {
filenameDict[file.name] = data.uuid;
Expand Down

0 comments on commit d059156

Please sign in to comment.