Reputation: 13588
I have this piece of code which uploads a file to Amazon S3 bucket. This works fine.
AmazonS3Client s3Client = new AmazonS3Client(
new BasicAWSCredentials(ACCESS_KEY, SECRET_KEY));
PutObjectRequest request = new PutObjectRequest(BUCKET_NAME,
uploadPath, new File(filePath));
s3Client.putObject(request);
How can I find if the file successfully got uploaded? I couldn't find any call back method in the documentation.
Upvotes: 1
Views: 988
Reputation: 2094
In case it will fail you will have an exception as Amazon is double checking it after the upload, in any case you can log into the console of Amazon to look at it yourself for testing purposes. The url: https://console.aws.amazon.com
Upvotes: 1