From 37b645e7d639b99781030f56b9a2b7ac62eef941 Mon Sep 17 00:00:00 2001 From: Scott Macdonald <57190223+scmacdon@users.noreply.github.com> Date: Mon, 6 Jul 2020 14:38:16 -0400 Subject: [PATCH] Update GeneratePresignedUrlAndUploadObject.java --- .../s3/GeneratePresignedUrlAndUploadObject.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/javav2/example_code/s3/src/main/java/com/example/s3/GeneratePresignedUrlAndUploadObject.java b/javav2/example_code/s3/src/main/java/com/example/s3/GeneratePresignedUrlAndUploadObject.java index f3acbd6391d..119553715ed 100644 --- a/javav2/example_code/s3/src/main/java/com/example/s3/GeneratePresignedUrlAndUploadObject.java +++ b/javav2/example_code/s3/src/main/java/com/example/s3/GeneratePresignedUrlAndUploadObject.java @@ -43,13 +43,13 @@ public class GeneratePresignedUrlAndUploadObject { public static void main(String[] args) { - // if (args.length < 2) { - // System.out.println("Please specify a bucket name and a key name that represents a PDF document"); - // System.exit(1); - // } + if (args.length < 2) { + System.out.println("Please specify a bucket name and a key name that represents a PDF document"); + System.exit(1); + } - String bucketName = "bucketscott2"; //args[0]; - String keyName = "notejuly5.txt"; //args[1]; + String bucketName = args[0]; + String keyName = args[1]; // Create a S3Presigner by using the default AWS Region and credentials S3Presigner presigner = S3Presigner.create();