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

Binary Field in Database

3 Answers 35 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Raymond
Top achievements
Rank 1
Raymond asked on 30 Jul 2009, 11:55 PM
We have uploaded attachments to SQL database and now wish to use RadEditor to display these attachments instead of opening a RadWindow to view the content. I have gone through the example "Custom File Dialog Content Provider" and have no clue how my requirement could be achieved.

Is it possible there have relevant examples for reference?

Regards

3 Answers, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 31 Jul 2009, 02:20 PM
Hello Raymond,

In our Custom content provider example (http://demos.telerik.com/aspnet-ajax/editor/examples/dbfilebrowsercontentprovider/defaultcs.aspx) we use a special HTTP handler (Handler.ashx) to stream the image data from the database. The handler takes a querystring parameter with the virtual path to the file, but if you have no hierarchy in your database (e.g. all files are in a single folder), then you can use a simple identifier. When you insert an image in the editor, its URL is simply referring to the handler address. For Example:

<img alt="" src="/aspnet-ajax/Editor/Examples/DBFileBrowserContentProvider/Handler.ashx?path=ROOT/Images/Nature/Fruits/7191.JPG" />


Best wishes,
Lini
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Raymond
Top achievements
Rank 1
answered on 04 Aug 2009, 09:23 PM
I have gone through the example several but cannot get a hint how it read a binary field from the database. Please advice
0
Tervel
Telerik team
answered on 05 Aug 2009, 07:47 AM
Hi Raymond,

This example comes with the RadControls installation - and for you to fully understand the example,  you need to look in the demo's folder on your local machine -
\Telerik.Web.Example\Editor\Examples\DBFileBrowserContentProvider

You need to look at the Handler.ashx file.

Best regards,
Tervel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Editor
Asked by
Raymond
Top achievements
Rank 1
Answers by
Lini
Telerik team
Raymond
Top achievements
Rank 1
Tervel
Telerik team
Share this question
or