Browse Source

Merge pull request 'feat: update the js' (#20) from fix-js into develop

Reviewed-by: yuyuanshifu <747342561@qq.com>
master
yuyuanshifu 5 years ago
parent
commit
adb36b316d
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      web_src/js/index.js

+ 5
- 2
web_src/js/index.js View File

@@ -2409,8 +2409,11 @@ $(document).ready(async () => {
timeout: 18000000, timeout: 18000000,
previewTemplate, previewTemplate,
init() { init() {
this.on('sending', (_file, _xhr, formData) => {
formData.append('dataset_id', $dataset.data('dataset-id'));
this.on('sending', (file, xhr, _formData) => {
const send = xhr.send;
xhr.send = function () {
send.call(xhr, file);
};
}); });
this.on('success', (file, _data) => { this.on('success', (file, _data) => {
const uuid = $dataset.data('uuid'); const uuid = $dataset.data('uuid');


Loading…
Cancel
Save