Skip to content

Commit

Permalink
Fixed asset upload (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbarlow26 authored Oct 12, 2021
1 parent c69d6f0 commit 2c02d0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,7 @@ const attachAsset = (client, url, filename) => __awaiter(void 0, void 0, void 0,
const contentLength = fs.statSync(filename).size;
yield client.rest.repos.uploadReleaseAsset({
url,
file: fs.createReadStream(filename),
data: fs.readFileSync(filename),
headers: {
'content-type': mime.lookup(filename),
'content-length': contentLength
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const attachAsset = async (client, url: string, filename: string) => {
const contentLength = fs.statSync(filename).size
await client.rest.repos.uploadReleaseAsset({
url,
file: fs.createReadStream(filename),
data: fs.readFileSync(filename),
headers: {
'content-type': mime.lookup(filename),
'content-length': contentLength
Expand Down

0 comments on commit 2c02d0f

Please sign in to comment.