mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-29 20:45:38 +08:00
9d3e69e867
- unvendor dropzone and upgrade it from 4.2.0 to 5.7.0 - make `csrf` available on window.config
10 lines
320 B
JavaScript
10 lines
320 B
JavaScript
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);
|
|
}
|