Convert Binary Images from database and save in Folder (Directory) in ASP.Net

aliyuusman
 
on Nov 05, 2021 11:23 AM
418 Views

Hello,

I have a sql server database for our organisaiton and the images are saved as Binary in SQL server Database 

now the database is heavy we want to remove the Images from database and save it in a directory.

please how can we do that. 

Thank you

Download FREE API for Word, Excel and PDF in ASP.Net: Download
dharmendr
 
on Nov 05, 2021 11:25 AM

Hi aliyuusman,

You need to fetch the record from database and loop through each Binary data.

Then convert the Binary data to byte array and save in folder.

Refer below link.

Save byte array as Image in folder (directory) and path in database using C# and VB.Net in ASP.Net