Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
KVNLS committed Sep 22, 2023
1 parent bfb181f commit 03e5a54
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 6 additions & 5 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 @@ -10780,7 +10780,8 @@ var uploadImage = async () => {
return link;
} catch (e3) {
await wait(3e3);
return upload(file, i3 + 1);
core.setOutput("error", e3);
return await upload(file, i3 + 1);
}
};
const getAllFiles = (currentPath) => {
Expand Down
3 changes: 2 additions & 1 deletion tools/actions/upload-images/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ const uploadImage = async () => {
return link;
} catch (e) {
await wait(3000);
return upload(file, i + 1);
core.setOutput("error", e);
return await upload(file, i + 1);
}
};

Expand Down

0 comments on commit 03e5a54

Please sign in to comment.