From c2e459ebf58bc6d0f05a2bf10c253ce69b89b8b5 Mon Sep 17 00:00:00 2001 From: David Nicholson Date: Tue, 23 Jun 2020 21:12:47 +0100 Subject: [PATCH] interpret file as binary --- dist/index.js | 2 +- src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 59a2aff..342acfb 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2959,7 +2959,7 @@ function uploadNewAsset(octokit, release, file, assetName) { release_id: release.id, name: assetName, headers: headers, - data: fs_1.default.readFileSync(file).toString(), + data: fs_1.default.readFileSync(file).toString("binary"), })]; case 2: _a.sent(); diff --git a/src/index.ts b/src/index.ts index bccce8e..6066e8a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -84,7 +84,7 @@ async function uploadNewAsset( release_id: release.id, name: assetName, headers, - data: fs.readFileSync(file).toString(), + data: fs.readFileSync(file).toString("binary"), }); }