将图像保存在数据库或文件结构中

发布于 2024-12-13 17:50:38 字数 360 浏览 4 评论 0原文

可能的重复:
在数据库中存储图像 - 是或否?

我很好奇知道,我是否应该将上传的图像作为二进制文件保存在数据库中还是保存在文件结构中?也许我应该使用这两种场景的一些例子。

重复主题:在数据库中存储图像 - 是还是否?

Possible Duplicate:
Storing Images in DB - Yea or Nay?

i am curios about to know, if i should save uploaded images in the database as binarys or save in the filestructure? Maybe some examples of when i should use both scenarios.

Duplicate topic: Storing Images in DB - Yea or Nay?

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

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

发布评论

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

评论(1

以为你会在 2024-12-20 17:50:38

完全取决于您的需求,但可能您想要在数据库中。
如果您只是上传自己的文件(例如自己的网页),则可以使用文件系统,但这不允许重复的名称,因为它(如果允许)会覆盖原始名称。

但另一方面,文件系统本身也可能是一个数据库

Depends totally on what your after, but likely you want then in a DB.
If you just upload you own (like own webpage) you could do with filesystem, but this doesn''t allow for duplicate names since it (if allowed to) overwrites the original.

But well on the other hand the filesystem could be a DB itself

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