views:

20

answers:

1

Hi folks,

I'm uploading photos, via PHP, to an Amazon S3 bucket. Everything is working great so far.

My question is about x-amz-meta. Would I use x-amz-meta key/value pairs to store data like the User ID of the person uploading and their account type (free, premium, etc.)? Or do I store this as regular metadata, not prefixed with x-amz-meta?

Currently sample metadata for a photo looks like:

Key: x-amz-meta-user-id      Value: 1
Key: x-amz-meta-user-type    Value: free
Key: Content-Type            Value: image/jpeg

Does that make sense? I hope so. Just checking I'm storing this metadata in the right way.

Thanks!

Jack

+1  A: 

Jack, yes your example data here looks good. Any custom metadata values must use the "x-amz-meta-" prefix. (I'm doing this myself with my self-defined "x-amz-meta-keywords" and "x-amz-meta-title".)

Paul

Paul K
Thanks very much for confirming, Paul! :)
Jack Webb-Heller