-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
src/transforms/v2-to-v3/__fixtures__/s3-presigned-post/callback.input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
10 changes: 10 additions & 0 deletions
10
src/transforms/v2-to-v3/__fixtures__/s3-presigned-post/callback.output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |