TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
vikasmathodu a
NA
3
7.8k
Streaming the files from UI to database
Sep 4 2012 11:40 AM
I am uploading files to SQL Server
1.I am streaming the files from UI layer.
2.When it comes to Business layer here is the implementation.
HttpWebRequest request = WebRequest.Create(postUrl) as HttpWebRequest;
Stream requestStream = request.GetRequestStream();
byte[] buffer = new byte[8 * 1024];
int len;
while ((len =
fileToUpload.File.
Read(buffer, 0, buffer.Length)) >0)
{
requestStream.Write(buffer, 0, len);
requestStream.Flush();
}
return request.GetResponse() as HttpWebResponse;
I am chunking the inputstream in 8KB and sending it to the response stream.
My question is ,if the length of
fileToUpload.File in the
business layer is 1 GB ,so will it stored physically in the memory and affect the performance?
Reply
Answers (
0
)
Paging in asp.net datalist control
query string