使用java上传文件
各位, 我正在开发一个自动化工具。为此我需要文件附件功能。后端使用 Mysql 5.2,Appache tomcate 服务器。任何人都可以建议我将文件上传到数据库更好还是将其上传到服务器更好。 提前致谢。
Dear All,
I am developing an automative tool.for this I need file attachement functionality.Back end using Mysql 5.2,Appache tomcate server.Can any body suggest me uploading file to DB is better OR uploading it to server is better.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
阅读这篇文章,了解哪个是最好的。同时我可以知道什么类型的文件(图像、电影、文本文档),它的文件大小是多少?
数据库中的文件路径绝对是可行的方法
在数据库中存储图像 - 是或不?
亮点:
文件存储。 Facebook 工程师对此进行了精彩的演讲。一个要点是了解目录中文件的实际限制。
大海捞针:高效存储数十亿张照片
Read this post for which is best .Meanwhile may i know what kind of file(image,movie,text doc) , what is it's file size?
File paths in the DB is definitely the way to go
Storing Images in DB - Yea or Nay?
HighLights:
File store. Facebook engineers had a great talk about it. One take away was to know the practical limit of files in a directory.
Needle in a Haystack: Efficient Storage of Billions of Photos
将文件上传到服务器并在数据库中拥有其路径条目是更好的方法。
Uploading the file to the server and having an entry for its path in the DB is a better approach.
DBMS有以下优点
你可以从多个站点访问它,如果你存储在FS中,你需要一些协议来传输它
使用DBMS,您将直接拥有关系事物,而对于FS,您需要以编程方式管理它
使用DBMS,您可以拥有ORM 的优势。
我的票投给了 DBMS
DBMS has following advantages
You can access it from multiple site, if you store in FS you need some protocol to transfer it
With DBMS you will have relation things directly while for FS you need to manage it programatically
With DBMS you can have advantage of ORM.
My vote goes to DBMS