mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
build: upload the file stream not a JSON blob for the read stream (#24889)
This commit is contained in:
@@ -252,7 +252,7 @@ async function uploadShasumFile (filePath, fileName, releaseId) {
|
||||
'content-type': 'text/plain',
|
||||
'content-length': fs.statSync(filePath).size
|
||||
},
|
||||
file: fs.createReadStream(filePath),
|
||||
data: fs.createReadStream(filePath),
|
||||
name: fileName
|
||||
}).catch(err => {
|
||||
console.log(`${fail} Error uploading ${filePath} to GitHub:`, err);
|
||||
|
||||
@@ -41,7 +41,7 @@ function uploadToGitHub () {
|
||||
octokit.repos.uploadReleaseAsset({
|
||||
url: uploadUrl,
|
||||
headers: getHeaders(filePath, fileName),
|
||||
file: fs.createReadStream(filePath),
|
||||
data: fs.createReadStream(filePath),
|
||||
name: fileName
|
||||
}).then(() => {
|
||||
console.log(`Successfully uploaded ${fileName} to GitHub.`);
|
||||
|
||||
Reference in New Issue
Block a user