-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move dropzone.js to npm/webpack #10645
Conversation
c79df90
to
9a35e6f
Compare
I think this upgrade allows us to remove |
We also need to look at making dropzone less difficult to configure - there are repeated user complaints about not being allowed to upload jars, zips etc. |
This is because we have this opinionated default:
I think we should allow everything by default. It should not be our decision. Additionally, mime types are a bad abstraction because different browsers send different mime types for the same file extension. File extentions would be much better as they are guaranteed to be the same across browsers. |
Will do a few more refactors, don't land yet. |
Codecov Report
@@ Coverage Diff @@
## master #10645 +/- ##
==========================================
- Coverage 43.61% 43.6% -0.01%
==========================================
Files 588 588
Lines 82488 82485 -3
==========================================
- Hits 35975 35967 -8
- Misses 42052 42056 +4
- Partials 4461 4462 +1
Continue to review full report at Codecov.
|
- unvendor dropzone and upgrade it from 4.2.0 to 5.7.0 - make `csrf` available on window.config
Refactors removed, they require more work. Should be good to land. |
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
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>
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 <xiaolunwen@gmail.com>
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>
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 <xiaolunwen@gmail.com>
csrf
available on window.configI noticed one bug already present on master while testing which is when 1 attachment is present, comment is edited and another one is added, it won't save correctly.
This PR should not introduce any regressions.