简体   繁体   English

如何确定来自移动客户端(例如iOS)的S3存储桶上的文件是否已更改

[英]How to determine if file has changed on the S3 bucket from a mobile client (e.g. iOS)

Is it possible to use AWSS3TransferManager or an alternative class to determine if a file has changed on the s3 server before downloading it? 在下载文件之前,可以使用AWSS3TransferManager或替代类来确定文件在s3服务器上是否已更改?

Ideally I'd like to have some sort of automatic function that takes into account automatically the following: 理想情况下,我希望具有某种自动功能,该功能自动考虑以下内容:

  • File size 文件大小
  • File type 文件类型
  • File name 文档名称

or: 要么:

  • File content data analysis (some sort of signature based on bit content) 文件内容数据分析(某种基于位内容的签名)

Alternatively: 或者:

I see that it is possible to get the modification date for an s3 bucket , however I am not sure how this works in iOS. 我看到可以获取s3存储桶修改日期 ,但是我不确定这在iOS中如何工作。

If you want to download the file like the AWSS3TransferManager download method, you can use the alternative class AWSS3GetObjectRequest / AWSS3GetObjectOutput . 如果要像AWSS3TransferManager download方法那样下载文件,则可以使用替代类AWSS3GetObjectRequest / AWSS3GetObjectOutput

If you do not want to download the file, you can use AWSS3HeadObjectRequest / AWSS3HeadObjectOutput that will return the object's metadata or "head" of the file. 如果你不想下载的文件,你可以使用AWSS3HeadObjectRequest / AWSS3HeadObjectOutput将返回对象的元数据或文件的“头”。

The value: lastModified will be in the AWSS3...ObjectOutput value for both class responses. 值: lastModified将在两个类响应的AWSS3...ObjectOutput值中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从 iOS 中的 AWS S3 存储桶下载文件? - How to download a file from a AWS S3 bucket in iOS? 如何在iOS(例如iPhone)中保存.plist文件? - How to save a .plist file in iOS (e.g. iPhone)? 如何使用其他应用程序(例如 Google 表格)从 Flutter 移动应用程序打开 Excel 文件? - How to open Excel file from Flutter mobile app using some other app, e.g. Google Sheets? 如何在Native移动应用程序(例如IOS)上实现3D Secure(Visa / MasterCard SecureCode验证) - How to implement 3D Secure (Verified by Visa / MasterCard SecureCode) on Native mobile app (e.g. IOS) 如何检测设备的iOS版本的内部版本号(例如13A452) - How to detect device's iOS-version's build number, (e.g. 13A452) 在 iOS 应用程序 (Swift) 中从 S3 存储桶中删除文件 - Deleting file from S3 bucket in iOS app (Swift) 如何获取iOS的设备型号(例如“ iPhone3,1”)? - How to get iOS's Device Model (e.g. “iPhone3,1”)? Mobile Safari和HTML5 iOS网络应用程序支持哪些音频文件类型(例如,mp3,ogg)? - What audio file types (e.g., mp3, ogg) are supported by Mobile Safari and HTML5 iOS web apps? 如何使用iOS SDK将AWS S3文件从一个存储桶复制到另一个存储桶 - How to copy an AWS S3 file from one bucket to another using iOS SDK 在iOS中,Google Cloud Storage Bucket(例如Firebase Storage)的CORS无法在Safari中获取文本 - CORS for Google Cloud Storage Bucket (e.g. Firebase Storage) not fetching text in Safari when in iOS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM