开发者

Amazon S3 - x-amz-meta

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜