哪个是存储图像的最佳位置 [英] Which is the best place to store an Image

查看:110
本文介绍了哪个是存储图像的最佳位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的专家,



我对asp.net项目有疑问,我的asp.net项目中有一个模块涉及Image Uploading ...



我对存储图像很困惑....



这是最好和最完美的方法存储图像,是存储在数据库还是文件夹中.. ??



哪个最好.. ??





谢谢和问候,



Dileep

解决方案

< blockquote>这取决于你有多少张图片,你如何分类它们。最流行的方法之一是给它们唯一的文件名并放在服务器端的某个目录中,并将文件名只存储在数据库中。



-SA


安全方面,您可以将图片存储在数据库中。另一方面,性能方面,您可以将图片存储在目录或虚拟目录中并保持数据库中的路径


将数据存储在数据库中是没有用的,除非您经常更改它们。

否则,它们管理起来更复杂,您总是需要在服务器端为它们编码,

所以为了保持简单,你应该避免使用它们。



这些链接可以提供一些帮助,



链接1

链接2


Dear Experts,

I have a doubt in asp.net project, I have a module in my asp.net project which involves Image Uploading...

I am confused about storing the image....

Which is the best and perfect method to store an Image, Is it store in Database or in a folder..??

Which is best..??


Thanks and Regards,

Dileep

解决方案

It depends on how many images do you have, how do you classify them. One of the most popular approaches is to give them unique file names and put in some directory on your server side and store just the file names in the database.

—SA


Security wise you can store the pictures in the database .on the other hand, performance wise you can store the pictures in a directory or virtual directory and keep the path at the database


Storing images in database is not useful, unless you are changing them frequently.
Otherwise, they are more complex to manage and you always need to code for them at server side,
so for keeping things simple you should avoid using them.

These links can be of some help,

link 1
link 2


这篇关于哪个是存储图像的最佳位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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