在数据库中存储用户的个人资料图片:小尺寸图像,因此在数据库中?

发布于 2024-12-14 17:35:54 字数 151 浏览 4 评论 0原文

如何在服务器上存储和检索用户的个人资料图片?在数据库中还是使用文件系统?我听说对于小图像来说,存储在数据库中更合适。如果大小在 60*60 px 到 80*80 px 之间较小,那么与文件系统相比,检索会更快!?

[我的数据库是 Cassandra。]

How to store and retrieve the profile pic image of the users on the server ? In the database or using File System? I heard that storing in DB is preferable for small images. If size would be small around from 60*60 px to 80*80 px then retreivals would be faster as compared to file system!?

[My database is Cassandra.]

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

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

发布评论

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

评论(1

剑心龙吟 2024-12-21 17:35:59

您可以在 Cassandra 中以原始字节存储图片。如果您使用Java,您可以参考以下链接 -
https://github.com /rantav/hector/tree/master/core/src/main/java/me/prettyprint/cassandra/io

另外以下讨论可能会有所帮助 -
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Storing-photos-images-docs-etc-td6078278.html

You can store a picture in Cassandra in raw bytes. if you are using Java, you can refer the following link -
https://github.com/rantav/hector/tree/master/core/src/main/java/me/prettyprint/cassandra/io

Also the following discussions might help -
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Storing-photos-images-docs-etc-td6078278.html

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