Open blob from database to view on browser without download.

0 Answers 236 Views
PdfViewer
d-cpt
Top achievements
Rank 2
d-cpt asked on 23 Sep 2022, 05:33 PM

Hi,

I can get my pdf file from sql svr database to view on browser:

DataRow dr = dsFile.Tables[0].Rows[0];

Byte[] fileBuffer = (byte[])dr["DocumentBinary"];

if (fileBuffer != null)
{
    radviewPdf.PdfjsProcessingSettings.FileSettings.Data = Convert.ToBase64String(fileBuffer);
}

How to view the PDF without saving to a folder (say ..\Download)?

On MS Edge, browser asks to click Open file but it also saved to Download.

On Chrome, browser asks to save file.

Thanks,

DT

 

Doncho
Telerik team
commented on 27 Sep 2022, 08:57 AM

Hi Duc,

I have just replied to your formal support ticket on the same topic.

Let's proceed with the discussion there only. I will share the relevant information here once we reach the resolution.

No answers yet. Maybe you can help?

Tags
PdfViewer
Asked by
d-cpt
Top achievements
Rank 2
Share this question
or