Skip to content

Commit

Permalink
fix: form-data debug
Browse files Browse the repository at this point in the history
  • Loading branch information
KVNLS committed Sep 22, 2023
1 parent bfb181f commit fb820f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tools/actions/upload-images/build/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10760,11 +10760,11 @@ var uploadImage = async () => {
if (i3 > 2) {
return "error";
}
const form = new FormData3();
form.set("type", "file");
form.set("image", file);
const encoder = new FormDataEncoder(form);
try {
const form = new FormData3();
form.set("type", "file");
form.set("image", file);
const encoder = new FormDataEncoder(form);
const res = await fetch("https://api.imgur.com/3/image", {
method: "POST",
headers: {
Expand All @@ -10779,6 +10779,7 @@ var uploadImage = async () => {
}
return link;
} catch (e3) {
core.setOutput("error", e3);
await wait(3e3);
return upload(file, i3 + 1);
}
Expand Down
1 change: 1 addition & 0 deletions tools/actions/upload-images/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const uploadImage = async () => {
}
return link;
} catch (e) {
core.setOutput("error", e);
await wait(3000);
return upload(file, i + 1);
}
Expand Down

0 comments on commit fb820f5

Please sign in to comment.