Edits history of script submission #22497 for ' Upload text in bucket (s3)'

  • bun
    One script reply has been approved by the moderators
    Ap­pro­ved
    import * as Minio from "minio@7";
    
    type S3 = {
      endPoint: string;
      port: number;
      useSSL: boolean;
      pathStyle: boolean;
      bucket: string;
      accessKey: string;
      secretKey: string;
      region: string;
    };
    export async function main(s3: S3, path: string, content: string) {
      return await new Minio.Client(s3).putObject(s3.bucket, path, content);
    }
    

    Submitted by hugo989 7 hours ago