import { removeObjectEmptyFields } from "https://deno.land/x/windmill_helpers@v1.1.1/mod.ts";
import { S3Client } from "https://deno.land/x/s3_lite_client@0.5.0/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 497 days ago
import { removeObjectEmptyFields } from "https://deno.land/x/windmill_helpers@v1.1.1/mod.ts";
import { S3Client } from "https://deno.land/x/s3_lite_client@0.5.0/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 500 days ago
import { Resource } from "https://deno.land/x/windmill@v1.85.0/mod.ts";
import { removeObjectEmptyFields } from "https://deno.land/x/windmill_helpers@v1.1.1/mod.ts";
import { S3Client } from "https://deno.land/x/s3_lite_client@0.5.0/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 625 days ago
import { Resource } from "https://deno.land/x/windmill@v1.85.0/mod.ts";
import { removeObjectEmptyFields } from "https://deno.land/x/windmill_helpers@v1.0.1/mod.ts";
import { S3Client } from "https://deno.land/x/s3_lite_client@0.2.0/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 628 days ago
import { Resource } from "https://deno.land/x/windmill@v1.70.1/mod.ts";
import { removeObjectEmptyFields } from "https://deno.land/x/windmill_helpers@v1.0.1/mod.ts";
import { S3Client } from "https://deno.land/x/s3_lite_client@0.2.0/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 663 days ago
import { Resource } from "https://deno.land/x/windmill@v1.60.0/mod.ts";
import { removeObjectEmptyFields } from "https://deno.land/x/windmill_helpers@v1.0.1/mod.ts";
import { S3Client } from "https://deno.land/x/s3_lite_client@0.2.0/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 698 days ago
import * as wmill from "https://deno.land/x/windmill@v1.30.0/mod.ts";
import { S3Client } from "https://deno.land/x/s3_lite_client@0.2.0/mod.ts";
export async function main(s3: wmill.Resource<"s3">, prefix: string = "") {
const s3client = new S3Client(s3);
return s3client.listObjects({ prefix });
}
Submitted by admin 859 days ago