makumbi says:
If Not IsDBNull(CType(ds.Tables("Files").Rows(i)("Photo"), Byte())) Then
Dim imgBytes As Byte() = CType(ds.Tables("Files").Rows(i)("Photo"), Byte())
Dim base64String As String = Convert.ToBase64String(imgBytes, 0, imgBytes.Length)
ds.Tables("Files").Rows(i)("Image") = "data:image/png;base64," & base64String
End If
Replace above with below code.
If Not IsDBNull(ds.Tables("Files").Rows(i)("Photo")) Then
Dim imgBytes As Byte() = CType(ds.Tables("Files").Rows(i)("Photo"), Byte())
Dim base64String As String = Convert.ToBase64String(imgBytes, 0, imgBytes.Length)
ds.Tables("Files").Rows(i)("Image") = "data:image/png;base64," & base64String
End If