-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add the download functionality to the Spring BOOT Photo example #1933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor changes.
javav2/example_code/ecs/Readme.md
Outdated
@@ -0,0 +1,80 @@ | |||
# Amazon Elastic Container Service Java code examples | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First time: Amazon Elastic Container Service (Amazon ECS)
Second time: Amazon ECS
Third and so on: ECS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is located in the first sentence.
return; | ||
} | ||
|
||
//load a properties file from class path, inside static method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
load -> Load
Also a period at the end of the sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
//load a properties file from class path, inside static method | ||
prop.load(input); | ||
|
||
// Populate the data members required for all tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Period at the end of the sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -410,7 +415,7 @@ The following Java code represents the **PhotoController** class that handles HT | |||
return s3Client.ListAllObjects("scottphoto"); | |||
} | |||
|
|||
// Generate a report that analyzes photos in a given bucket | |||
// generates a report that analyzes photos in a given bucket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generate -> Generate and a period at the end of the sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -420,18 +425,18 @@ The following Java code represents the **PhotoController** class that handles HT | |||
// Get a list of key names in the given bucket | |||
List myKeys = s3Client.ListBucketObjects("scottphoto"); | |||
|
|||
// Create a list to store the data | |||
List myList = new ArrayList<List>(); | |||
// Create a List to store the data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Period at the end of the sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -420,18 +425,18 @@ The following Java code represents the **PhotoController** class that handles HT | |||
// Get a list of key names in the given bucket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Period at the end of the sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
||
// Loop through each element in the List | ||
// loop through each element in the List | ||
int len = myKeys.size(); | ||
for (int z=0 ; z < len; z++) { | ||
|
||
String key = (String) myKeys.get(z); | ||
byte[] keyData = s3Client.getObjectBytes ("scottphoto", key); | ||
//myMap.put(key, keyData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -51,7 +58,6 @@ String getImages(HttpServletRequest request, HttpServletResponse response) { | |||
return s3Client.ListAllObjects("scottphoto"); | |||
} | |||
|
|||
|
|||
// generates a report that analyzes photos in a given bucket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generates -> Generates and a period at the end of the sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -63,7 +69,7 @@ String report(HttpServletRequest request, HttpServletResponse response) { | |||
List myKeys = s3Client.ListBucketObjects("scottphoto"); | |||
|
|||
// Create a List to store the data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Period!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -63,7 +69,7 @@ String report(HttpServletRequest request, HttpServletResponse response) { | |||
List myKeys = s3Client.ListBucketObjects("scottphoto"); | |||
|
|||
// Create a List to store the data | |||
List myList = new ArrayList<List>(); | |||
List<List> myList = new ArrayList<List>(); | |||
|
|||
// loop through each element in the List |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loop -> Loop and a period at the end of the sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM -- thanks!
aws-doc-sdk-examples Pull Request
Thank you for making a submission to the aws-doc-sdk-examples repository. For more information about submitting pull requests to this repository, see Guidelines for contributing.
NOTE: This PR template contains three sections. Depending on the reason for your pull request, please fill out the section that applies to you and then remove the other two sections.
New SDK Code Example
The submitter has:
Existing Example Update
The submitter has:
Resolve Issue
Issue #
Description of Changes
Please describe the changes you have made here.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.