Skip to content

Commit

Permalink
fix: upload image failed
Browse files Browse the repository at this point in the history
  • Loading branch information
fish.yu committed Apr 18, 2024
1 parent 8d0568b commit aff68f4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ class Downloader {
const result = await this.gh.writeFile(imageUrl, content, { encode: false });
console.log('uploadImageFromUrl result:', result);
if (!result.status) {
console.error('upload image failed:', url, content);
throw new Error('upload image failed:', result);
}
return `https://github.com/${imageUrl}`;
Expand Down

0 comments on commit aff68f4

Please sign in to comment.