Skip to content

Instantly share code, notes, and snippets.

View jorke's full-sized avatar
💭
is typing..

Jorke Odolphi jorke

💭
is typing..
View GitHub Profile
@jorke
jorke / put.js
Created October 24, 2024 11:09
signed s3 upload
import https from "node:https";
import { XMLParser } from "fast-xml-parser";
import fs from 'node:fs';
import {
S3Client,
PutObjectCommand
} from "@aws-sdk/client-s3";
import {
getSignedUrl,
@jorke
jorke / formdata-post.js
Last active October 24, 2024 23:32
s3 presigned post example with content-type - NOTE field.
import fs from 'node:fs';
import {
S3Client,
PutObjectCommand
} from "@aws-sdk/client-s3";
import { createPresignedPost } from '@aws-sdk/s3-presigned-post';
import FormData from 'form-data';
const client = new S3Client({ region: "ap-southeast-2" });