存储视频和图像. [英] Storing videos and images.

查看:83
本文介绍了存储视频和图像.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我是ASP.NET的新手,我想开发一个基于视频的应用程序,例如上传视频,查看视频,下载视频.

哪一种是好的方法,存储到db?或存储在磁盘空间中?

还有其他好的方法吗?

请提出建议!

谢谢,
Adersh Ram

Hi Folks,

I am new in ASP.NET, i would like to develope a video based Application, like upload the videos, view the videos, download the videos.

Which one is good method, Store to db ? or store in a disk space ?

Any other good methods to do this ?

Please suggest !!!

Thanks,
Adersh Ram

推荐答案

在磁盘空间中存储使您的应用程序比存储到db中更快.
因此,为每个图像创建uniq ID,并将其名称和路径存储到数据库和磁盘中的文件中.
storing in disk space make your application more faster then storing into db.
so crete the uniq id for each image and store its name and path into database and file in disk.


Solution1对您的问题有确切的答案.与在数据库中存储相比,将图像/视频存储在应用程序文件夹中总是更好.

您可以在保存图像/视频时为其分配唯一的文件名.对于唯一名称,您可以使用 GUID .然后将该文件名/路径保存在您的数据库表中.
http://msdn.microsoft.com/en-us/library/system.guid. newguid.aspx
Solution1 has the exact answer to your Question. Storing Images/Videos in your application folder is always better as compare to storing in DB.

You may assign unique file-names to your Images/Videos while saving them. For Unique names you may use GUID. And then save that file name/path in your DB table.
http://msdn.microsoft.com/en-us/library/system.guid.newguid.aspx


这篇关于存储视频和图像.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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