Skip to content

Commit

Permalink
maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
hhvrc committed Aug 1, 2024
1 parent eceb2aa commit 7d4ee0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/dist/s3-upload.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .github/scripts/src/s3-upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function getFileHashMD5(fileName: string): string {
return md5sum.split(' ')[0];
}

async function uploadStream(Body: stream.Readable, Key: string, ContentLength: number | undefined = undefined, contentTypeMime: string | null = null, ContentMD5: string | undefined = undefined) {
async function uploadStream(Body: stream.Readable | Buffer, Key: string, ContentLength: number | undefined = undefined, contentTypeMime: string | null = null, ContentMD5: string | undefined = undefined) {
const command = new PutObjectCommand({
Bucket: s3Bucket,
Key,
Expand Down Expand Up @@ -96,7 +96,7 @@ async function uploadDir(dirName: string, remoteDirKey: string) {
}
}
async function uploadStdin(remoteFileKey: string, contentTypeMime: string | null) {
const stdin = stream.Readable.from(fs.readFileSync(0));
const stdin = fs.readFileSync(0);
await uploadStream(stdin, remoteFileKey, undefined, contentTypeMime);
}

Expand Down

0 comments on commit 7d4ee0f

Please sign in to comment.