I have a task to extract and save image from database to local folder using C#. I succeed to save when there is only a single image, but failed when there are multiple images in a single column. I don't have the code that save this multiple images, so I don't know how they save that multiple images in that database.
Is there anyone who have experience in this? I have search everywhere how to save or extract multiple images from a single column, but there is no answer yet.
There is a column that tells how many images are stored in the Image column.
This is my code that succeed save single image, but for multiple image i don't know how to do with that blob data. I tried to save with '.rar'/'.zip' but it won't open.
FileStream FS1 = new FileStream("image.png", FileMode.Create);
Migrate.DataMigrasi item = ListDataMigrasi.Where(x => x.CustNo == "00000000001").FirstOrDefault();
byte[] blob = (byte[])item.Image;
FS1.Write(blob, 0, blob.Length);
FS1.Close();
FS1 = null;