如何检查一键/文件在Amazon S3存储使用AWS的iOS SDK V2的存在?一键、存在、文件、Amazon

2023-09-11 08:43:49 作者:一刀两断°

我写一个iOS应用程序,从一个Amazon S3存储上传和下载文件。我被说功能性的工作,但我需要编写单元测试它。有没有什么方法可以检查文件是否存在在我的水桶,这样我可以证实,它已被上传??

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??

推荐答案

AWSS3 有一个名为方法 - headObject:。你可以用它来查看该对象存在于桶。

AWSS3 has a method called - headObject:. You can use it to see if the object exists in the bucket.