How can I check the existence of a key/file on an Amazon S3 Bucket using AWS iOS SDK v2?

时光毁灭记忆、已成空白 提交于 2019-12-02 03:09:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!