在Asp.Net上映像上传 [英] Image Uploading in Asp.Net

查看:48
本文介绍了在Asp.Net上映像上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我打算上传图片。哪种方法可以保证和性能考虑?



我们是否会上传服务器中的文件,并将名称存储在db或



上传数据库本身的图像..





第二件事,是否在上传之前压缩文件将两种情况下的性能都很好(服务器上传,数据库上传)。





问候,

Sarathkumar .N

Hi ,

I am planning to do image upload . Which method will secure & Performance consideration??

Whether we will upload the files in the server, and store the name in db or

Upload the image in db itself..


Second thing , Whether compressing the file before upload will be good in performance for both cases (server upload , db upload).


Regards,
Sarathkumar.N

推荐答案

就性能而言,不建议在数据库中存储图像,因为在进入DB之前必须将它们转换为二进制对象。在DB中存储图像名称并在服务器上物理存储图像总是被认为更好。
As far as performance is concerned storing images in Database is not advised, because you have to convert them into binary object before stroing into DB. Storing image names in DB and physically storing images on server is always considered better.


我同意zafar sultan643,我建议上传有限大小的图像。在将图像上传到服务器之前,先进行50KB的验证。
I agreed to zafar sultan643, Also I advice to upload image of limited size. Put validation for 50KB before uploading the image on to the server.


这篇关于在Asp.Net上映像上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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