Edits history of script submission #107 for ' List objects in a bucket (s3)'

  • deno
    One script reply has been approved by the moderators
    Ap­pro­ved
    import { removeObjectEmptyFields } from "https://deno.land/x/[email protected]/mod.ts";
    import { S3Client } from "https://deno.land/x/[email protected]/mod.ts";
    
    type S3 = {
      endPoint: string;
      port: number;
      useSSL: boolean;
      pathStyle: boolean;
      bucket: string;
      accessKey: string;
      secretKey: string;
      region: string;
    };
    export async function main(
      s3: S3,
      prefix?: string,
      bucketName?: string,
      maxResults?: number,
      pageSize?: number,
    ) {
      const s3client = new S3Client(s3);
      const options = removeObjectEmptyFields({
        prefix,
        bucketName,
        maxResults,
        pageSize,
      });
      const objects = s3client.listObjects(options);
    
      const result: any[] = [];
      for await (const obj of objects) {
        result.push(obj);
      }
    
      return result;
    }
    

    Submitted by hugo697 376 days ago

  • deno
    import { removeObjectEmptyFields } from "https://deno.land/x/[email protected]/mod.ts";
    import { S3Client } from "https://deno.land/x/[email protected]/mod.ts";
    
    type S3 = {
      endPoint: string;
      port: number;
      useSSL: boolean;
      pathStyle: boolean;
      bucket: string;
      accessKey: string;
      secretKey: string;
      region: string;
    };
    export async function main(
      s3: S3,
      prefix?: string,
      bucketName?: string,
      maxResults?: number,
      pageSize?: number,
    ) {
      const s3client = new S3Client(s3);
      const options = removeObjectEmptyFields({
        prefix,
        bucketName,
        maxResults,
        pageSize,
      });
      const objects = s3client.listObjects(options);
    
      const result: any[] = [];
      for await (const obj of objects) {
        result.push(obj);
      }
    
      return result;
    }
    

    Submitted by admin 1009 days ago

  • deno
    import { removeObjectEmptyFields } from "https://deno.land/x/[email protected]/mod.ts";
    import { S3Client } from "https://deno.land/x/[email protected]/mod.ts";
    
    type S3 = {
      endPoint: string;
      port: number;
      useSSL: boolean;
      pathStyle: boolean;
      bucket: string;
      accessKey: string;
      secretKey: string;
      region: string;
    };
    export async function main(
      s3: S3,
      prefix?: string,
      bucketName?: string,
      maxResults?: number,
      pageSize?: number,
    ) {
      const s3client = new S3Client(s3);
      const options = removeObjectEmptyFields({
        prefix,
        bucketName,
        maxResults,
        pageSize,
      })
      const objects = s3client.listObjects(options);
    
      const result: any[] = []
      for await (const obj of objects) {
        result.push(obj)
      }
    
      return result
    }
    

    Submitted by admin 1012 days ago

  • deno
    import { Resource } from "https://deno.land/x/[email protected]/mod.ts";
    import { removeObjectEmptyFields } from "https://deno.land/x/[email protected]/mod.ts";
    import { S3Client } from "https://deno.land/x/[email protected]/mod.ts";
    
    export async function main(
      s3: Resource<"s3">,
      prefix?: string,
      bucketName?: string,
      maxResults?: number,
      pageSize?: number,
    ) {
      const s3client = new S3Client(s3);
      const options = removeObjectEmptyFields({
        prefix,
        bucketName,
        maxResults,
        pageSize,
      })
      const objects = s3client.listObjects(options);
    
      const result: any[] = []
      for await (const obj of objects) {
        result.push(obj)
      }
    
      return result
    }
    

    Submitted by adam186 1137 days ago

  • deno
    import { Resource } from "https://deno.land/x/[email protected]/mod.ts";
    import { removeObjectEmptyFields } from "https://deno.land/x/[email protected]/mod.ts";
    import { S3Client } from "https://deno.land/x/[email protected]/mod.ts";
    
    export async function main(
      s3: Resource<"s3">,
      prefix?: string,
      bucketName?: string,
      maxResults?: number,
      pageSize?: number,
    ) {
      const s3client = new S3Client(s3);
      const options = removeObjectEmptyFields({
        prefix,
        bucketName,
        maxResults,
        pageSize,
      })
      const objects = s3client.listObjects(options);
    
      const result: any[] = []
      for await (const obj of objects) {
        result.push(obj)
      }
    
      return result
    }
    

    Submitted by adam186 1140 days ago

  • deno
    import { Resource } from "https://deno.land/x/[email protected]/mod.ts";
    import { removeObjectEmptyFields } from "https://deno.land/x/[email protected]/mod.ts";
    import { S3Client } from "https://deno.land/x/[email protected]/mod.ts";
    
    export async function main(
      s3: Resource<"s3">,
      prefix?: string,
      bucketName?: string,
      maxResults?: number,
      pageSize?: number,
    ) {
      const s3client = new S3Client(s3);
      const options = removeObjectEmptyFields({
        prefix,
        bucketName,
        maxResults,
        pageSize,
      })
      const objects = s3client.listObjects(options);
    
      const result: any[] = []
      for await (const obj of objects) {
        result.push(obj)
      }
    
      return result
    }
    

    Submitted by adam186 1175 days ago

  • deno
    import { Resource } from "https://deno.land/x/[email protected]/mod.ts";
    import { removeObjectEmptyFields } from "https://deno.land/x/[email protected]/mod.ts";
    import { S3Client } from "https://deno.land/x/[email protected]/mod.ts";
    
    export async function main(
      s3: Resource<"s3">,
      prefix?: string,
      bucketName?: string,
      maxResults?: number,
      pageSize?: number,
    ) {
      const s3client = new S3Client(s3);
      const options = removeObjectEmptyFields({
        prefix,
        bucketName,
        maxResults,
        pageSize,
      })
      const objects = s3client.listObjects(options);
    
      const result: any[] = []
      for await (const obj of objects) {
        result.push(obj)
      }
    
      return result
    }
    

    Submitted by adam186 1210 days ago

  • deno
    import * as wmill from "https://deno.land/x/[email protected]/mod.ts";
    import { S3Client } from "https://deno.land/x/[email protected]/mod.ts";
    
    export async function main(s3: wmill.Resource<"s3">, prefix: string = "") {
      const s3client = new S3Client(s3);
    
      return s3client.listObjects({ prefix });
    }
    

    Submitted by admin 1371 days ago