问题
I writing an iOS app that uploads and downloads files from an Amazon S3 bucket. I got said functionality working, but I need to write unit tests for it. Is there any way I can check if a file exists in my bucket so that I can confirm that it has been uploaded??
回答1:
AWSS3
has a method called - headObject:
. You can use it to see if the object exists in the bucket.
来源:https://stackoverflow.com/questions/26977483/how-can-i-check-the-existence-of-a-key-file-on-an-amazon-s3-bucket-using-aws-ios