在哪里上传文件-在文件夹中还是在数据库中? [英] Where to upload files - in a folder or in a database?

查看:69
本文介绍了在哪里上传文件-在文件夹中还是在数据库中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个职位描述以及与此描述相关的2或3个pdf文件.
我想像电子邮件附件一样存储此信息.就像特定的附件与特定的邮件相关.因此,将附件上传到服务器或数据库中的文件夹中.

I have a job description and 2 or 3 pdf files related to this description.
I want to store this information like a email attachments. Like specific attachments are related to a specific message. So where to upload the attached files, in a folder in server or in a database.

推荐答案

任何一种方法都可以.实际上,这取决于您是否要将它们存储在数据库或服务器中.

哪个空间对您更重要.然后,如果将其放置在服务器中,则可能有人会打开文件并进行查看-如果这对您来说是安全性问题,那么您可以选择DB方式.另一方面,保留在数据库中会影响将其保留在服务器上的文件夹中的性能.

您需要查看适合您的项目的内容.
Either way is fine. It actually depends on do you want to have them stored in DB or server.

Which space is more important to you. Then, if it is placed in a server then someone might open the files and have a look - if this is a security concern to you then you might choose DB way. On other side, keeping in DB will have performance hit related to keeping it in folder on server.

You need to look what fits in more for your project.


这篇关于在哪里上传文件-在文件夹中还是在数据库中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆