Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created September 8, 2021 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/3683da7f61c099f32b1f19892aa6300e to your computer and use it in GitHub Desktop.
Save velotiotech/3683da7f61c099f32b1f19892aa6300e to your computer and use it in GitHub Desktop.
let s3Params = {
Bucket: "your-temporary-bucket-name,
Conditions : [
["content-length-range",1,31457280]
],
Fields : {
key: "path/to/your/object"
},
Expires: 300 //in seconds
};
const s3 = new S3({region : process.env.AWSREGION });
s3.createPresignedPost(s3Params)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment