0.7.0-alpha.1 • Published 3 months ago

@flink-app/s3-plugin v0.7.0-alpha.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

Flink API Docs

WORK IN PROGRESS 👷‍♀️👷🏻‍♂️

A FLINK plugin that lets you work with s3.

Usage

Install plugin to your flink app project:

npm i -S @flink-app/s3-plugin

Add and configure plugin in your app startup (probable the index.ts in root project):

import { s3Plugin } from "@flink-app/s3-plugin";


function start() {
  new FlinkApp<AppContext>({
    name: "My app",
    plugins: [
        // Register plugin
        s3Plugin({
                accessKeyId: "XXX",
                secretAccessKey: "YYY",
                bucket: "ZZZ",
                s3Acl: "public-read",
                enableUpload: true,
        }),
    ],
  }).start();
}

Finally add the s3PluginContext to your Ctx.ts

import { s3PluginContext } from "@flink-app/s3-plugin"
export interface Ctx extends FlinkContext<s3PluginContext> {

}

Using built in upload endpoint

Set enableUpload = true to enable the /file-upload endpoint. Post a multipart file upload to that endpoint to upload the file to S3. Protect this route by specifying the required permission by specifying uploadPermissionRequired property to the required permission. Eg. uploadPermissionRequired="authenticated" setting.

Using the s3Client

From your handlers, access the s3Client by ctx.plugins.s3Plugin.s3Client. You will find methods for upload, delete and so on.

0.7.0-alpha.1

3 months ago

0.7.0-alpha.0

10 months ago

0.5.0

1 year ago

0.6.0

1 year ago

0.4.7

1 year ago

0.4.5

1 year ago

0.4.6

1 year ago

0.4.4

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.12

1 year ago

0.4.2

1 year ago

0.3.11

1 year ago

0.3.8

2 years ago

0.3.7

2 years ago

0.3.5

2 years ago