Skip to content

Commit

Permalink
test: s3-presigned-post/callback
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Apr 16, 2024
1 parent 515ccdf commit d0e50d7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import AWS from "aws-sdk";

const s3 = new AWS.S3();
const params = { Bucket: "bucket", Fields: { key: "key" } };

s3.createPresignedPost(params, function (err, data) {
console.log('The URL is', data.url);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import AWS from "aws-sdk";

const s3 = new AWS.S3();
const params = { Bucket: "bucket", Fields: { key: "key" } };

// S3 createPresignedPost with callbacks are not supported in AWS SDK for JavaScript (v3).
// Please convert to 'client.createPresignedPost(params)', and re-run aws-sdk-js-codemod.
s3.createPresignedPost(params, function (err, data) {
console.log('The URL is', data.url);
});

0 comments on commit d0e50d7

Please sign in to comment.