亚马逊 S3 - x-amz-meta

发布于 2024-09-16 09:18:01 字数 422 浏览 5 评论 0原文

我正在通过 PHP 将照片上传到 Amazon S3 存储桶。到目前为止一切都进展顺利。

我的问题是关于 x-amz-meta 的。我是否会使用 x-amz-meta 键/值对来存储上传者的用户 ID 及其帐户类型(免费、高级等)等数据?或者我是否将其存储为常规元数据,而不以 x-amz-meta 为前缀?

目前照片的示例元数据如下所示:

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

这有意义吗?我希望如此。只是检查我是否以正确的方式存储此元数据。

谢谢!

杰克

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清风无影 2024-09-23 09:18:01

自定义元数据值必须使用 x-amz-meta- 前缀,如示例所示:

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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文