将文件保存在数据库中 [英] save documents in database

查看:88
本文介绍了将文件保存在数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过将asp.net与c#一起使用来将文档保存在sqlserver db中.
我该怎么办?
每个用户可以保存多个文档,并且每个用户最大可以保存2mb的大小来保存文档.保存之前,应检查其所拥有的大小.
我该如何管理?

I want to save Documents in sqlserver db by using asp.net with c#.
How can I do this?
Each user can save multiple documents and user has 2mb size maximum to save doc. Before saving it should check the size of whatever he has.
How can I manage this?

推荐答案

请参见

在将文件保存到数据库之前,获取每个文件的大小以及所有文件的总和.如果大小超过2MB,则显示错误消息.
Before saving the file into database, Get the size of each file and sum of all. If the size gets more than 2MB then show an error message.


这篇关于将文件保存在数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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