开发者

Amazon S3 - x-amz-meta

开发者 https://www.devze.com 2023-01-13 03:01 出处:网络
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 开发者_JAVA百科store data like t

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 开发者_JAVA百科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


Custom metadata values must use the x-amz-meta- prefix, like your examples:

Key: x-amz-meta-user-id      Value: 1
Key: x-amz-meta-user-type    Value: free
0

精彩评论

暂无评论...
验证码 换一张
取 消