diff --git a/packages/publisher/electron-release-server/src/PublisherERS.ts b/packages/publisher/electron-release-server/src/PublisherERS.ts index 275fae1394..f6ac69fd01 100644 --- a/packages/publisher/electron-release-server/src/PublisherERS.ts +++ b/packages/publisher/electron-release-server/src/PublisherERS.ts @@ -131,7 +131,13 @@ export default class PublisherERS extends PublisherBase { artifactForm.append('token', token); artifactForm.append('version', packageJSON.version); artifactForm.append('platform', ersPlatform(makeResult.platform, makeResult.arch)); - artifactForm.append('file', fs.createReadStream(artifactPath)); + + // see https://github.com/form-data/form-data/issues/426 + const fileOptions = { + knownLength: fs.statSync(artifactPath).size, + }; + artifactForm.append('file', fs.createReadStream(artifactPath), fileOptions); + await authFetch('api/asset', { method: 'POST', body: artifactForm,