Skip to content

Commit

Permalink
Disable dropzone's timeout (go-gitea#12024)
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: go-gitea#10645
Ref: https://xhr.spec.whatwg.org/#the-timeout-attribute
Fixes: go-gitea#12022
Fixes: go-gitea#11906

Co-authored-by: Lunny Xiao <[email protected]>
  • Loading branch information
2 people authored and Yohann Delafollye committed Jul 31, 2020
1 parent d0b8ee1 commit 0aaba3b
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 @@ -899,6 +899,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 @@ -2304,6 +2305,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 0aaba3b

Please sign in to comment.