Hi Tomaz
Can you advise you I get the last modified date and etag if not in the
metadata? I can't see where it is provided.
thanks
On 15/09/2012, at 5:54 AM, Tomaž Muraus wrote:
Looking at the code, it should include content_type in the meta_data
dictionary, but not other metadata fields when retrieving a single
object.
It looks like it's a simple code change to make it return all the
metadata
fields. I will have a look at it soon.
On Thu, Sep 13, 2012 at 3:26 AM, Andrew Stuart <
[email protected]> wrote:
I'm using S3 libcloud and when I retrieve a file, I am not provided
with
the metadata, nor does it provide the etag, last-modified date or the
content-type.
I checked the headers returned from the Amazon S3 query and these
fields
are all present as follows:
{'content-length': '11612', 'x-amz-id-2': '**
rqpGyzJ5tq3x0jzyXrNjNQ9qQc14mG**WX4kDridXS26jtGY62GTtj0XiHjfla**NgOk',
'accept-ranges': 'bytes', 'server': 'AmazonS3', 'last-modified':
'Thu, 13
Sep 2012 07:13:22 GMT', 'etag':
'"**448fd165349e7b1a07c935b6ee69e3**db"',
'x-amz-request-id': '2A32A41463F2D8FF', 'date': 'Thu, 13 Sep 2012
08:14:42
GMT', 'x-amz-meta-rabbits': 'monkeys', 'content-type': 'image/jpeg'}
I had a look at the source code and it looks like this is the libcloud
function that is meant to be returning the data.
def _headers_to_object(self, object_name, container, headers):
meta_data = { 'content_type': headers['content-type'] }
hash = headers['etag'].replace('"', '')
obj = Object(name=object_name, size=headers['content-
length']**,
hash=hash, extra=None,
meta_data=meta_data,
container=container,
driver=self)
return obj
As far as I can tell, the above code is not inserting the required
data.
Anyone able to throw any light on this?
thanks
andrew
--
Message protected by MailGuard: e-mail anti-virus, anti-spam and
content filtering.http://www.mailguard.com.au/mg
Click here to report this message as spam:
https://login.mailguard.com.au/report/1FyjdIhkaV/4P4aezxcv3eTuJTcgFC6aI/1.2