0
Create a file in S3 (Bun)
One script reply has been approved by the moderators Verified
Created by henri186 56 days ago Viewed 5098 times
0
Submitted by henri186 Bun
Verified 56 days ago
1
import * as wmill from 'windmill-client';
2
import { S3Object } from 'windmill-client';
3

4
export async function main(s3_file_path: string) {
5
	const s3_file_output: S3Object = {
6
		s3: s3_file_path
7
	};
8

9
	const file_content = 'Hello Windmill!';
10
	// file_content can be either a string or ReadableStream<Uint8Array>
11
	await wmill.writeS3File(s3_file_output, file_content);
12
	return s3_file_output;
13
}