diff options
author | silverwind <me@silverwind.io> | 2020-06-24 06:10:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-24 00:10:03 -0400 |
commit | ec0743bab84cd876183c93669a7b61e9bc691937 (patch) | |
tree | 793ce725b610a9875d043a079ace6b8724f0a005 /web_src | |
parent | d9aa007a9e84bd255b16bd02b9ab18719cb650a2 (diff) | |
download | gitea-ec0743bab84cd876183c93669a7b61e9bc691937.tar.gz gitea-ec0743bab84cd876183c93669a7b61e9bc691937.zip |
Disable dropzone's timeout (#12024)
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: https://github.com/go-gitea/gitea/pull/10645
Ref: https://xhr.spec.whatwg.org/#the-timeout-attribute
Fixes: https://github.com/go-gitea/gitea/issues/12022
Fixes: https://github.com/go-gitea/gitea/issues/11906
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/js/index.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js index a39d8b0dd3..6b435edd0f 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -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] = { @@ -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; |