what's best way to check if a S3 object exists?

后端 未结 5 1670
北海茫月
北海茫月 2021-01-17 11:47

Currently, I make a GetObjectMetaDataRequest, if the GetObjectMetaDataResponse throw an exception means the object doesn\'t exist. Is there a bette

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-17 12:09

    You're probably going to have to use the REST API yourself, as the method suggested, internally just does exactly the same thing (try...catch on the request)

提交回复
热议问题