I have an S3 bucket with files in it. I can successfully download and display the file in my application.
However, I want to find out if the document is the last or not. With the Firefox S3 extension, I see that in the bucket file name, the file size and download time are saved on S3. An example of loading time is 10/10/2012 11:35 PM
to get url i use
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); dispatch_async(queue, ^{
How can I upload a file upload date to Amazon S3?
EDIT :: ANSWER
OK, responding with the following method, I can get the date
S3GetObjectMetadataRequest *getMetadataRequest = [[S3GetObjectMetadataRequest alloc] initWithKey:_fileName withBucket:[Constants pictureBucket]]; S3GetObjectMetadataResponse *getMetadataResponse = [self.s3 getObjectMetadata:getMetadataRequest]; NSString *fileLastModifiedDate = [[NSString alloc] init]; fileLastModifiedDate = [NSString stringWithFormat:@"%@",getMetadataResponse.lastModified]; NSLog(@"Last Modified date %@",fileLastModifiedDate);
source share