As per your question, you mentioned upload an image. An upload is only possible when the image gets in a location which is accessible from any client machine.. like
- a cloud database, where you can store the image as BLOB. or
- a cloud storage where you can upload the images, and then retrieve from client machines.
EDIT:
Create a converter to convert the byte[] you fetched from DB. Import the resource to your wpf control and Bind the static resource to your image control.
class BinaryImageConverter : IValueConverter
{
object IValueConverter.Convert( object value,
Type targetType,
object parameter,
System.Globalization.CultureInfo culture )
{
if(value != null && value is byte[])
{
byte[] bytes = value as byte[];
MemoryStream stream = new MemoryStream( bytes );
BitmapImage image = new BitmapImage();
image.BeginInit();
image.StreamSource = stream;
image.EndInit();
return image;
}
return null;
}
object IValueConverter.ConvertBack( object value,
Type targetType,
object parameter,
System.Globalization.CultureInfo culture )
{
throw new Exception( "The method or operation is not implemented." );
}
}
<Image Source="{Binding Path=Image, Converter={StaticResource imgConverter}}" />
Please refer to this link for help in dynamic resources