This is a migrated thread and some comments may be shown as answers.

SQL Filestream - ASP.NET VB

4 Answers 119 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Kris
Top achievements
Rank 1
Kris asked on 24 Jun 2011, 01:43 AM
I am trying to allow my web application to support multiple file selection/uploads but cannot figure it out. Let me get into more detail, I am writing an application for real estate management and need to be able to upload hundreds of files at once. We were going to do this with Microsoft SQL Server Filestream and RADAsyncUpload. We have some additional fields that need to be filled for the photos also. We are writing this in Visual Basic and any help is appreciated.


Thank you,
Kris

4 Answers, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 24 Jun 2011, 12:49 PM
Hi Kristopher,

I have already answered your support ticket regarding the same issue. To avoid duplication, let continue the communication in the support ticket.

Regards,
Peter Filipov
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Atlas
Top achievements
Rank 1
answered on 23 Jul 2012, 11:11 PM
Do you have a code sample that supports SQL filestream with AsynchUpload?
Anything special I need to know in order to accomplish it?
C# please.
0
Vasssek
Top achievements
Rank 1
answered on 26 Jul 2012, 10:39 AM
Hello,

Does somebody have example with SQL filestream and AsyncUpload in C#, please ?

Best regards

Vasssek
0
Bozhidar
Telerik team
answered on 26 Jul 2012, 11:09 AM
Hi,

You can see how to insert and retrieve files from a SQL Filestream table in the following article:
http://blogs.msdn.com/b/spike/archive/2011/02/28/inserting-a-file-into-a-filestream-table-from-c-and-how-to-get-it-back-as-well.aspx 

All you need to do to make it work with RadAsyncUpload is get the image bytes from the uploaded file. You can do this with the following code:
protected void AsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
{
    using (Stream stream = e.File.InputStream)
    {
        byte[] imageData = new byte[stream.Length];
        stream.Read(imageData, 0, (int)stream.Length);
        //Insert into Database
    }
}


Kind regards,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
AsyncUpload
Asked by
Kris
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Atlas
Top achievements
Rank 1
Vasssek
Top achievements
Rank 1
Bozhidar
Telerik team
Share this question
or