問題是我需要從Amazon獲取etag信息才能真正獲取文件本身。正在使用S3元數據請求獲取ETag嗎?
經過研究,我發現正確的方法是使用S3GetObjectMetadataRequest和後來的getObjectMetadata來獲取S3GetObjectMetadataResponse對象。
但是,試圖創建一個S3GetObjectMetadataRequest用時:
S3GetObjectMetadataRequest *metadata = [[S3GetObjectMetadataRequest alloc] initWithKey:key withBucket:bucket];
強烈的警告顯示:
incompatible Objective-C types initializing 'struct S3GetObjectRequest *', expected 'struct S3GetObjectMetadataRequest *'
上S3GetObjectMetadataRequest的文件不存在,我無法找到任何在任何地方參考。
我可以忽略嗎?有沒有一種更簡單的方式來獲得ETag而無需下載所有文件?