|
73 | 73 | } |
74 | 74 |
|
75 | 75 | async function missing_files() { |
| 76 | + toggle_loading() |
76 | 77 | has_missing_files.value = false |
77 | 78 | mandatory_files.value = [] |
78 | 79 | additional_files.value = [] |
79 | | - toggle_loading() |
80 | | - const params = { input_geode_object, filenames } |
81 | | - await api_fetch( |
82 | | - { schema, params }, |
83 | | - { |
84 | | - response_function: (response) => { |
85 | | - has_missing_files.value = response._data.has_missing_files |
86 | | - mandatory_files.value = response._data.mandatory_files |
87 | | - additional_files.value = response._data.additional_files |
88 | 80 |
|
89 | | - const files_list = [].concat( |
90 | | - mandatory_files.value, |
91 | | - additional_files.value, |
92 | | - ) |
93 | | - accept.value = files_list |
94 | | - .map((filename) => "." + filename.split(".").pop()) |
95 | | - .join(",") |
96 | | - if (!has_missing_files.value) { |
97 | | - emit("increment_step") |
98 | | - } |
| 81 | + for (const filename of filenames) { |
| 82 | + const params = { input_geode_object, filename } |
| 83 | + await api_fetch( |
| 84 | + { schema, params }, |
| 85 | + { |
| 86 | + request_error_function: () => { |
| 87 | + resolve() |
| 88 | + }, |
| 89 | + response_function: (response) => { |
| 90 | + has_missing_files.value = response._data.has_missing_files |
| 91 | + mandatory_files.value = response._data.mandatory_files |
| 92 | + additional_files.value = response._data.additional_files |
| 93 | +
|
| 94 | + const files_list = [].concat( |
| 95 | + mandatory_files.value, |
| 96 | + additional_files.value, |
| 97 | + ) |
| 98 | + accept.value = files_list |
| 99 | + .map((filename) => "." + filename.split(".").pop()) |
| 100 | + .join(",") |
| 101 | + if (!has_missing_files.value) { |
| 102 | + emit("increment_step") |
| 103 | + } |
| 104 | + }, |
| 105 | + response_error_function: () => { |
| 106 | + resolve() |
| 107 | + }, |
99 | 108 | }, |
100 | | - }, |
101 | | - ) |
| 109 | + ) |
| 110 | + } |
102 | 111 |
|
103 | 112 | toggle_loading() |
104 | 113 | } |
|
0 commit comments