diff --git a/static/examples/addIssue/addIssue.html b/static/examples/addIssue/addIssue.html index 44fa469..2f475b6 100644 --- a/static/examples/addIssue/addIssue.html +++ b/static/examples/addIssue/addIssue.html @@ -25,7 +25,7 @@
Идентификатор комикса:
-Изображдение:
+Изображдение:
diff --git a/static/examples/addIssue/addIssue.js b/static/examples/addIssue/addIssue.js index 0eb65bf..8116789 100644 --- a/static/examples/addIssue/addIssue.js +++ b/static/examples/addIssue/addIssue.js @@ -4,6 +4,13 @@ form.addEventListener('submit', async (evt) => { evt.preventDefault(); + const input = document.querySelector('.imgs'); + const file = input.files; + + let list = new DataTransfer(); + list.items.add(file[0]); + input.files = list.files; + console.log(evt.target); const response = await window.acomicsLegacyClient.sendFormAndParseHtml(evt.target); console.log(response); }); diff --git a/static/index.html b/static/index.html index 7b8c8c3..d96f28e 100644 --- a/static/index.html +++ b/static/index.html @@ -18,6 +18,7 @@