ajax流式传输,如何使用AjaxFileUpload将图像文件流式传输到SQL数据源?
我想用AjaxFileUpload將多個(gè)文件上傳到SQL數(shù)據(jù)庫。我有一種方法可以用來上傳單個(gè)文件;與aspx頁面:如何使用AjaxFileUpload將圖像文件流式傳輸?shù)絊QL數(shù)據(jù)源?
而且與aspx.cs頁:
protected void UploadFile(object sender, EventArgs e)
{
FileUpload FileUpload1 = file_Image;
// Read the file and convert it to Byte Array
string filePath = file_Image.PostedFile.FileName;
string filename = Path.GetFileName(filePath);
if (FileUpload1.HasFile && FileUpload1.PostedFile != null)
{
Stream fs = file_Image.PostedFile.InputStream;
BinaryReader br = new BinaryReader(fs);
Byte[] bytes = br.ReadBytes((Int32)fs.Length);}}
但是,我怎么能使用類似的東西AjaxFileUpload或者是它甚至有可能到流這樣的圖像數(shù)據(jù)來自Ajax控件?非常感謝您分享您的知識(shí)!
2013-03-08
Jacman
+0
感謝您的答復(fù);我正在使用SQL Server 2008 R2(SQL Server Management Studio) –
2013-03-08 16:59:17
+0
我想這是一個(gè)復(fù)雜的問題;但是,有什么方法可以處理? –
2013-03-08 17:40:46
+0
你有什么困難?允許多個(gè)文件上傳或保存到數(shù)據(jù)庫的控件? –
2013-03-08 19:23:34
總結(jié)
以上是生活随笔為你收集整理的ajax流式传输,如何使用AjaxFileUpload将图像文件流式传输到SQL数据源?的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 小米电视2测评:蓝图远大,力不从心
- 下一篇: 汪海爬虫学习笔记1
