mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-23 10:08:02 +08:00
Move dropzone.js to npm/webpack (#10645)
- unvendor dropzone and upgrade it from 4.2.0 to 5.7.0 - make `csrf` available on window.config
This commit is contained in:
9
web_src/js/features/dropzone.js
Normal file
9
web_src/js/features/dropzone.js
Normal file
@ -0,0 +1,9 @@
|
||||
export default async function createDropzone(el, opts) {
|
||||
const [{ default: Dropzone }] = await Promise.all([
|
||||
import(/* webpackChunkName: "dropzone" */'dropzone'),
|
||||
import(/* webpackChunkName: "dropzone" */'dropzone/dist/dropzone.css'),
|
||||
]);
|
||||
|
||||
Dropzone.autoDiscover = false;
|
||||
return new Dropzone(el, opts);
|
||||
}
|
Reference in New Issue
Block a user